mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
allocator: properly remove memory block from memory graph
This commit is contained in:
parent
68e5481d97
commit
9490594167
2 changed files with 6 additions and 0 deletions
|
@ -116,6 +116,8 @@ public:
|
|||
free = [&](MemoryBlock* mem) {
|
||||
logger->warn("no free callback defined for addr space {}, not freeing",
|
||||
mem->getAddrSpaceId());
|
||||
|
||||
removeMemoryBlock(*mem);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -62,6 +62,8 @@ LinearAllocator::LinearAllocator(MemoryManager::AddressSpaceId memoryAddrSpaceId
|
|||
mem->getSize(), mem->getOffset(), mem->getAddrSpaceId());
|
||||
logger->warn("free() not implemented");
|
||||
logger->debug("available memory: {:#x} bytes", getAvailableMemory());
|
||||
|
||||
removeMemoryBlock(*mem);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -133,6 +135,8 @@ HostRam::HostRamAllocator::HostRamAllocator() :
|
|||
logger->warn("munmap() failed for {:#x} of size {:#x}",
|
||||
mem->getOffset(), mem->getSize());
|
||||
}
|
||||
|
||||
removeMemoryBlock(*mem);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue