SWDEV-508632 - Align address to 2 MBs for hidden heap allocation. (#29)

This commit is contained in:
Patel, Jaydeepkumar
2025-04-02 04:03:29 -07:00
committed by GitHub
parent 98f1db181c
commit b5c9cbc236
10 changed files with 33 additions and 24 deletions
+4 -2
View File
@@ -77,7 +77,8 @@ void HostMemoryReference::deallocateMemory(const Context& context) {
}
}
Memory::Memory(Context& context, Type type, Flags flags, size_t size, void* svmPtr)
Memory::Memory(Context& context, Type type, Flags flags, size_t size, void* svmPtr,
size_t alignment)
: numDevices_(0),
deviceMemories_(NULL),
destructorCallbacks_(NULL),
@@ -96,7 +97,8 @@ Memory::Memory(Context& context, Type type, Flags flags, size_t size, void* svmP
svmHostAddress_(svmPtr),
resOffset_(0),
flagsEx_(0),
lockMemoryOps_(true) /* Memory Ops Lock */ {
lockMemoryOps_(true),
alignment_(alignment) /* Memory Ops Lock */ {
svmPtrCommited_ = (flags & CL_MEM_SVM_FINE_GRAIN_BUFFER) ? true : false;
canBeCached_ = true;
}