mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
lli/RecordingMemoryManager: Free allocated sections in the destructor to satisfy --vg-leak!
FIXME: It could be generalized in MemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -15,6 +15,17 @@
|
||||
#include "RecordingMemoryManager.h"
|
||||
using namespace llvm;
|
||||
|
||||
RecordingMemoryManager::~RecordingMemoryManager() {
|
||||
for (SmallVectorImpl<Allocation>::iterator
|
||||
I = AllocatedCodeMem.begin(), E = AllocatedCodeMem.end();
|
||||
I != E; ++I)
|
||||
free(I->first.base());
|
||||
for (SmallVectorImpl<Allocation>::iterator
|
||||
I = AllocatedDataMem.begin(), E = AllocatedDataMem.end();
|
||||
I != E; ++I)
|
||||
free(I->first.base());
|
||||
}
|
||||
|
||||
uint8_t *RecordingMemoryManager::
|
||||
allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID) {
|
||||
// The recording memory manager is just a local copy of the remote target.
|
||||
|
Reference in New Issue
Block a user