class PageManager
Defined at line 26 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.h
PageManager backs our fake heap implementation, managing blocks of
pages allocated by the OS.
Its implementation is complicated by |cmpct_trim()|, which allows for the
freeing of strict heads and tails of the blocks; otherwise, we could just
implement |heap_page_alloc()| and |heap_page_free()| as thin wrappers around
|new[]| and |delete[]|, respectively.
Public Methods
void * AllocatePages (size_t num_pages)
Defined at line 11 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.cc
void FreePages (void * p, size_t num_pages)
Defined at line 26 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.cc
void PageManager ()
Defined at line 28 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.h
void ~PageManager ()
Defined at line 29 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.h
void FailNext (size_t count)
Tells the PageManager to fail the next |count| |AllocatePages| calls.
Defined at line 68 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.cc
void IncFailuresReported ()
Called by cmpctmalloc via |heap_report_alloc_failure|.
Defined at line 70 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.cc
size_t GetFailuresReported ()
Returns the number of times |IncFailureCount| was called.
Defined at line 72 of file ../../zircon/kernel/lib/heap/cmpctmalloc/tests/page_manager.cc