#define CopiedSpace_h
#include "CopiedAllocator.h"
-#include "HeapBlock.h"
#include "HeapOperation.h"
#include "TinyBloomFilter.h"
#include <wtf/Assertions.h>
#include <wtf/DoublyLinkedList.h>
#include <wtf/HashSet.h>
#include <wtf/OSAllocator.h>
-#include <wtf/PageAllocationAligned.h>
#include <wtf/PageBlock.h>
+#include <wtf/SpinLock.h>
#include <wtf/StdLibExtras.h>
-#include <wtf/TCSpinLock.h>
#include <wtf/ThreadingPrimitives.h>
namespace JSC {
static CopiedBlock* blockFor(void*);
Heap* heap() const { return m_heap; }
+
+ size_t takeBytesRemovedFromOldSpaceDueToReallocation()
+ {
+ size_t result = 0;
+ std::swap(m_bytesRemovedFromOldSpaceDueToReallocation, result);
+ return result;
+ }
private:
static bool isOversize(size_t);
Mutex m_loanedBlocksLock;
ThreadCondition m_loanedBlocksCondition;
size_t m_numberOfLoanedBlocks;
+
+ size_t m_bytesRemovedFromOldSpaceDueToReallocation;
static const size_t s_maxAllocationSize = CopiedBlock::blockSize / 2;
static const size_t s_initialBlockNum = 16;