Web Analytics Made Easy - Statcounter
Skip to content

Class SBCHeapPage#

ClassList > 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:

  • objectSize Size of each object that will be stored in the page, in bytes.
  • numberOfObjectsInPage Number of objects that the page can contain.
  • nextPage Pointer 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.

virtual SBCHeapPage::~SBCHeapPage () 

The destructor frees the memory allocated for the page's cells.