Class SBCHeapPage#
Public Functions#
| Type | Name |
|---|---|
| SBCHeapPage (std::size_t objectSize, unsigned int numberOfObjectsInPage, SBCHeapPage * nextPage) Builds a heap page. |
|
| virtual | ~SBCHeapPage () Destroys the heap page and releases its allocated memory. |
Public Functions Documentation#
function SBCHeapPage#
Builds a heap page.
SBCHeapPage::SBCHeapPage (
std::size_t objectSize,
unsigned int numberOfObjectsInPage,
SBCHeapPage * nextPage
)
Constructs a heap page for a specific object size and capacity.
This constructor allocates memory for a page that can hold a given number of objects, each of the specified size, and optionally links the page to a next page in the heap.
Parameters:
objectSizeSize of each object that will be stored in the page, in bytes.numberOfObjectsInPageNumber of objects that the page can contain.nextPagePointer to the next page in the heap book, or nullptr if there is none.
function ~SBCHeapPage#
Destroys the heap page and releases its allocated memory.
The destructor frees the memory allocated for the page's cells.