nw::demo::DemoAllocator Class

Syntax

class DemoAllocator : public nw::os::IAllocator

Description

Main memory allocator for demos.

Member Constants

S DEFAULT_ALIGNMENT The default value when the alignment specification has been omitted.(Derives from IAllocator.
S CACHE_LINE_ALIGNMENT Cache alignment.(Derives from IAllocator.

Member Functions

Create/Destroy
Initialize Initializes the demo allocator. Initializes the expanded heap internally.
Finalize Destroys the demo allocator.
Allocating and Freeing Memory
V Alloc Allocates memory from main memory.
V Free Returns memory back to main memory.
Debug
GetFreeSize Gets the empty memory size.
GetMemoryBlockSize Returns the size of the allocated memory block.
Dump Displays the status of main memory.
SetBreakAlloc Sets the the stop conditions when allocating memory.
SetBreakFree Sets the the stop conditions when freeing memory.
Utilities
Alloc Allocates memory when the alignment specification has been omitted.
AllocAndClear Allocates memory and clears with the specified byte data.(Derives from IAllocator.
AllocAndConstruct Allocates the memory required for the specified number of objects and calls a constructor.(Derives from IAllocator.
AllocAndFill Allocates the memory required for the specified number of objects and copies the specified object.(Derives from IAllocator.
DestructAndFree Calls a destructor for the specified number of objects and frees memory.(Derives from IAllocator.
Other
DemoAllocator Constructor.
GetStartAddress Gets the start address specified at the time of initialization.

Class Hierarchy

nw::os::IAllocator
  nw::demo::DemoAllocator


CONFIDENTIAL