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
Cette révision appartient à :
German Andryeyev
2025-01-24 19:26:39 -05:00
Parent 63cf3057ba
révision 296dce5570
11 fichiers modifiés avec 670 ajouts et 39 suppressions
+3 -3
Voir le fichier
@@ -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) {