mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
Add checks for mmap and getSpace
Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
090bfb9642
commit
22ed1be1a3
@@ -62,6 +62,7 @@ inline void *LinearStream::getSpace(size_t size) {
|
||||
cmdContainer->closeAndAllocateNextCommandBuffer();
|
||||
}
|
||||
UNRECOVERABLE_IF(sizeUsed + size > maxAvailableSpace);
|
||||
UNRECOVERABLE_IF(reinterpret_cast<int64_t>(buffer) <= 0);
|
||||
auto memory = ptrOffset(buffer, sizeUsed);
|
||||
sizeUsed += size;
|
||||
return memory;
|
||||
|
||||
Reference in New Issue
Block a user