webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
TestWebKitAPI::MetaAllocatorTest Class Reference
Inheritance diagram for TestWebKitAPI::MetaAllocatorTest:
testing::Test

Classes

class  SimpleTestAllocator
 

Public Types

enum  SanityCheckMode { RunSanityCheck, DontRunSanityCheck }
 
enum  HeapGrowthMode { DontGrowHeap, ForTestDemandAllocCoalesce, ForTestDemandAllocDontCoalesce }
 
enum  TestFIFOAllocMode { FillAtEnd, EagerFill }
 

Public Member Functions

virtual void SetUp ()
 
virtual void TearDown ()
 
MetaAllocatorHandleallocate (size_t sizeInBytes, SanityCheckMode sanityCheckMode=RunSanityCheck)
 
void free (MetaAllocatorHandle *handle, SanityCheckMode sanityCheckMode=RunSanityCheck)
 
void notifyFree (void *start, size_t sizeInBytes)
 
void sanityCheck ()
 
void confirm (MetaAllocatorHandle *handle)
 
void confirmHighWatermark (MetaAllocatorHandle *handle)
 
void confirm (uintptr_t startByte, uintptr_t endByte, bool value)
 
size_t bytesAllocated ()
 
size_t bytesCommitted ()
 
bool & byteState (void *address)
 
bool & byteState (uintptr_t address)
 
bool & pageState (uintptr_t page)
 
void testOneAlloc (size_t size)
 
void testRepeatAllocFree (size_t firstSize,...)
 
void testSimpleFullCoalesce (size_t firstSize, size_t secondSize, size_t thirdSize)
 
void testFIFOAlloc (TestFIFOAllocMode mode,...)
 
void testFillHeap (size_t sizeInBytes, size_t numAllocations)
 
void testRightAllocation (size_t firstLeftSize, size_t firstRightSize, size_t secondLeftSize, size_t secondRightSize)
 
void testBestFit (size_t firstSize, size_t step, unsigned numSlots, SanityCheckMode sanityCheckMode)
 
void testShrink (size_t firstSize, size_t secondSize)
 
void testDemandAllocCoalesce (size_t firstSize, size_t numPages, size_t secondSize)
 
void testDemandAllocDontCoalesce (size_t firstSize, size_t numPages, size_t secondSize)
 

Public Attributes

HeapGrowthMode currentHeapGrowthMode
 
size_t allowAllocatePages
 
size_t requestedNumPages
 
unsigned additionalPagesInHeap
 
Vector< bool, 0 > * memoryMap
 
Vector< bool, 0 > * pageMap
 
bool allocatorDestroyed
 
SimpleTestAllocatorallocator
 

Static Public Attributes

static const unsigned basePage = 1
 
static const unsigned defaultPagesInHeap = 100
 

Additional Inherited Members

- Protected Member Functions inherited from testing::Test
 Test ()
 

Member Enumeration Documentation

◆ HeapGrowthMode

Enumerator
DontGrowHeap 
ForTestDemandAllocCoalesce 
ForTestDemandAllocDontCoalesce 

◆ SanityCheckMode

Enumerator
RunSanityCheck 
DontRunSanityCheck 

◆ TestFIFOAllocMode

Enumerator
FillAtEnd 
EagerFill 

Member Function Documentation

◆ allocate()

MetaAllocatorHandle* TestWebKitAPI::MetaAllocatorTest::allocate ( size_t  sizeInBytes,
SanityCheckMode  sanityCheckMode = RunSanityCheck 
)
inline

◆ bytesAllocated()

size_t TestWebKitAPI::MetaAllocatorTest::bytesAllocated ( )
inline

◆ bytesCommitted()

size_t TestWebKitAPI::MetaAllocatorTest::bytesCommitted ( )
inline

◆ byteState() [1/2]

bool& TestWebKitAPI::MetaAllocatorTest::byteState ( void address)
inline

◆ byteState() [2/2]

bool& TestWebKitAPI::MetaAllocatorTest::byteState ( uintptr_t  address)
inline

◆ confirm() [1/2]

void TestWebKitAPI::MetaAllocatorTest::confirm ( MetaAllocatorHandle handle)
inline

◆ confirm() [2/2]

void TestWebKitAPI::MetaAllocatorTest::confirm ( uintptr_t  startByte,
uintptr_t  endByte,
bool  value 
)
inline

◆ confirmHighWatermark()

void TestWebKitAPI::MetaAllocatorTest::confirmHighWatermark ( MetaAllocatorHandle handle)
inline

◆ free()

void TestWebKitAPI::MetaAllocatorTest::free ( MetaAllocatorHandle handle,
SanityCheckMode  sanityCheckMode = RunSanityCheck 
)
inline

◆ notifyFree()

void TestWebKitAPI::MetaAllocatorTest::notifyFree ( void start,
size_t  sizeInBytes 
)
inline

◆ pageState()

bool& TestWebKitAPI::MetaAllocatorTest::pageState ( uintptr_t  page)
inline

◆ sanityCheck()

void TestWebKitAPI::MetaAllocatorTest::sanityCheck ( )
inline

◆ SetUp()

virtual void TestWebKitAPI::MetaAllocatorTest::SetUp ( )
inlinevirtual

Reimplemented from testing::Test.

◆ TearDown()

virtual void TestWebKitAPI::MetaAllocatorTest::TearDown ( )
inlinevirtual

Reimplemented from testing::Test.

◆ testBestFit()

void TestWebKitAPI::MetaAllocatorTest::testBestFit ( size_t  firstSize,
size_t  step,
unsigned  numSlots,
SanityCheckMode  sanityCheckMode 
)
inline

◆ testDemandAllocCoalesce()

void TestWebKitAPI::MetaAllocatorTest::testDemandAllocCoalesce ( size_t  firstSize,
size_t  numPages,
size_t  secondSize 
)
inline

◆ testDemandAllocDontCoalesce()

void TestWebKitAPI::MetaAllocatorTest::testDemandAllocDontCoalesce ( size_t  firstSize,
size_t  numPages,
size_t  secondSize 
)
inline

◆ testFIFOAlloc()

void TestWebKitAPI::MetaAllocatorTest::testFIFOAlloc ( TestFIFOAllocMode  mode,
  ... 
)
inline

◆ testFillHeap()

void TestWebKitAPI::MetaAllocatorTest::testFillHeap ( size_t  sizeInBytes,
size_t  numAllocations 
)
inline

◆ testOneAlloc()

void TestWebKitAPI::MetaAllocatorTest::testOneAlloc ( size_t  size)
inline

◆ testRepeatAllocFree()

void TestWebKitAPI::MetaAllocatorTest::testRepeatAllocFree ( size_t  firstSize,
  ... 
)
inline

◆ testRightAllocation()

void TestWebKitAPI::MetaAllocatorTest::testRightAllocation ( size_t  firstLeftSize,
size_t  firstRightSize,
size_t  secondLeftSize,
size_t  secondRightSize 
)
inline

◆ testShrink()

void TestWebKitAPI::MetaAllocatorTest::testShrink ( size_t  firstSize,
size_t  secondSize 
)
inline

◆ testSimpleFullCoalesce()

void TestWebKitAPI::MetaAllocatorTest::testSimpleFullCoalesce ( size_t  firstSize,
size_t  secondSize,
size_t  thirdSize 
)
inline

Member Data Documentation

◆ additionalPagesInHeap

unsigned TestWebKitAPI::MetaAllocatorTest::additionalPagesInHeap

◆ allocator

SimpleTestAllocator* TestWebKitAPI::MetaAllocatorTest::allocator

◆ allocatorDestroyed

bool TestWebKitAPI::MetaAllocatorTest::allocatorDestroyed

◆ allowAllocatePages

size_t TestWebKitAPI::MetaAllocatorTest::allowAllocatePages

◆ basePage

const unsigned TestWebKitAPI::MetaAllocatorTest::basePage = 1
static

◆ currentHeapGrowthMode

HeapGrowthMode TestWebKitAPI::MetaAllocatorTest::currentHeapGrowthMode

◆ defaultPagesInHeap

const unsigned TestWebKitAPI::MetaAllocatorTest::defaultPagesInHeap = 100
static

◆ memoryMap

Vector<bool, 0>* TestWebKitAPI::MetaAllocatorTest::memoryMap

◆ pageMap

Vector<bool, 0>* TestWebKitAPI::MetaAllocatorTest::pageMap

◆ requestedNumPages

size_t TestWebKitAPI::MetaAllocatorTest::requestedNumPages

The documentation for this class was generated from the following file: