mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Align mmaped bo address properly
Change-Id: I010f6619821ad715bb6f0e9640be19943a45abd8 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
eb8f5fa301
commit
8892ee3f1f
@@ -17,6 +17,9 @@ extern off_t lseekReturn;
|
||||
extern std::atomic<int> lseekCalledCount;
|
||||
|
||||
inline void *mmapMock(void *addr, size_t length, int prot, int flags, int fd, off_t offset) noexcept {
|
||||
if (addr) {
|
||||
return addr;
|
||||
}
|
||||
void *ptr = nullptr;
|
||||
if (length > 0) {
|
||||
ptr = alignedMalloc(length, MemoryConstants::pageSize64k);
|
||||
|
||||
Reference in New Issue
Block a user