SWDEV-497841 - Add virtual memory heap

Add initial implementation of virtual memory heap with
dynamic virtual memory mapping support for memory pools.
DEBUG_HIP_MEM_POOL_VMHEAP controls the new method.

Change-Id: I8dc5be2e0f34ab472f1800f43bb6243639a5e500
This commit is contained in:
German Andryeyev committed 2025-02-20 10:55:49 -05:00
1 förälder 63cf3057ba
incheckning 296dce5570
11 files changed
+670 -39

No files matched your search

+3 -3
Visa fil
@@ -1,4 +1,4 @@
/* Copyright (c) 2010 - 2022 Advanced Micro Devices, Inc.
/* Copyright (c) 2010 - 2025 Advanced Micro Devices, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -192,12 +192,12 @@ void Memory::operator delete(void* p, const Context& context) { Memory::operator
void Memory::addSubBuffer(Memory* view) {
amd::ScopedLock lock(lockMemoryOps());
subBuffers_.push_back(view);
subBuffers_.emplace(view);
}
void Memory::removeSubBuffer(Memory* view) {
amd::ScopedLock lock(lockMemoryOps());
subBuffers_.remove(view);
subBuffers_.erase(view);
}
bool Memory::allocHostMemory(void* initFrom, bool allocHostMem, bool forceCopy) {