mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
[Allocator] Lift the slab size and size threshold into template
parameters rather than runtime parameters. There is only one user of these parameters and they are compile time for that user. Making these compile time seems to better reflect their intended usage as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205143 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -314,8 +314,8 @@ namespace {
|
||||
// confuse them with the blocks of memory described above.
|
||||
std::vector<sys::MemoryBlock> CodeSlabs;
|
||||
JITSlabAllocator BumpSlabAllocator;
|
||||
BumpPtrAllocator StubAllocator;
|
||||
BumpPtrAllocator DataAllocator;
|
||||
BumpPtrAllocatorImpl<DefaultSlabSize, DefaultSizeThreshold> StubAllocator;
|
||||
BumpPtrAllocatorImpl<DefaultSlabSize, DefaultSizeThreshold> DataAllocator;
|
||||
|
||||
// Circular list of free blocks.
|
||||
FreeRangeHeader *FreeMemoryList;
|
||||
@@ -590,8 +590,8 @@ DefaultJITMemoryManager::DefaultJITMemoryManager()
|
||||
#endif
|
||||
LastSlab(0, 0),
|
||||
BumpSlabAllocator(*this),
|
||||
StubAllocator(DefaultSlabSize, DefaultSizeThreshold, BumpSlabAllocator),
|
||||
DataAllocator(DefaultSlabSize, DefaultSizeThreshold, BumpSlabAllocator) {
|
||||
StubAllocator(BumpSlabAllocator),
|
||||
DataAllocator(BumpSlabAllocator) {
|
||||
|
||||
// Allocate space for code.
|
||||
sys::MemoryBlock MemBlock = allocateNewSlab(DefaultCodeSlabSize);
|
||||
|
Reference in New Issue
Block a user