NeverFreeMemory

class NeverFreeMemory

This class is used to allocate bytes of memory from a pool that is never intended to be freed. It is particularly useful to support DeletedChain, which allocates memory in just such a fashion.

When it is known that memory will not be freed, it is preferable to use this instead of the standard malloc() (or global_operator_new()) call, since this will help reduce fragmentation problems in the dynamic heap. Also, memory allocated from here will exhibit less wasted space.

Inheritance diagram

digraph inheritancea075fd1dde { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "NeverFreeMemory" [URL="acron.core.NeverFreeMemory.html#acron.core.NeverFreeMemory",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "NeverFreeMemory" [arrowsize=0.75,style=""]; }
static NeverFreeMemory.get_total_alloc()

Returns the total number of bytes consumed by all the pages allocated internally by this object.

static NeverFreeMemory.get_total_unused()

Returns the difference between get_total_alloc() and get_total_used(). This represents bytes in allocated pages that have not (yet) been used by the application.

static NeverFreeMemory.get_total_used()

Returns the total number of bytes requested by the application in calls to NeverFreeMemory::alloc().