diff options
Diffstat (limited to 'src/qml/memory/qv4mm_p.h')
-rw-r--r-- | src/qml/memory/qv4mm_p.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h index 17957d0cd6..e16a0ca544 100644 --- a/src/qml/memory/qv4mm_p.h +++ b/src/qml/memory/qv4mm_p.h @@ -118,8 +118,8 @@ struct StackAllocator { }; struct BlockAllocator { - BlockAllocator(ChunkAllocator *chunkAllocator) - : chunkAllocator(chunkAllocator) + BlockAllocator(ChunkAllocator *chunkAllocator, ExecutionEngine *engine) + : chunkAllocator(chunkAllocator), engine(engine) { memset(freeBins, 0, sizeof(freeBins)); #if MM_DEBUG @@ -153,7 +153,7 @@ struct BlockAllocator { return used; } - void sweep(ClassDestroyStatsCallback classCountPtr); + void sweep(); void freeAll(); void resetBlackBits(); void collectGrayItems(MarkStack *markStack); @@ -164,6 +164,7 @@ struct BlockAllocator { size_t usedSlotsAfterLastSweep = 0; HeapItem *freeBins[NumBins]; ChunkAllocator *chunkAllocator; + ExecutionEngine *engine; std::vector<Chunk *> chunks; #if MM_DEBUG uint allocations[NumBins]; @@ -171,8 +172,8 @@ struct BlockAllocator { }; struct HugeItemAllocator { - HugeItemAllocator(ChunkAllocator *chunkAllocator) - : chunkAllocator(chunkAllocator) + HugeItemAllocator(ChunkAllocator *chunkAllocator, ExecutionEngine *engine) + : chunkAllocator(chunkAllocator), engine(engine) {} HeapItem *allocate(size_t size); @@ -189,6 +190,7 @@ struct HugeItemAllocator { } ChunkAllocator *chunkAllocator; + ExecutionEngine *engine; struct HugeChunk { Chunk *chunk; size_t size; |