Nebula
Loading...
Searching...
No Matches
Win32::Win32Heap Class Reference

#include <win32heap.h>

Detailed Description

Win32 implementation of the class Memory::Heap.

Under Win32, the LowFragmentationHeap feature is generally turned on.

Public Member Functions

 Win32Heap (const char *name, size_t initialSize=0, size_t maxSize=0)
 constructor (name must be static string!)
 
 ~Win32Heap ()
 destructor
 
const char * GetName () const
 get heap name
 
void * Alloc (size_t size)
 allocate a block of memory from the heap
 
void * Realloc (void *ptr, size_t newSize)
 re-allocate a block of memory
 
void Free (void *ptr)
 free a block of memory which has been allocated from this heap
 

Static Public Member Functions

static void Setup ()
 static setup method (called by Core::SysFunc::Setup)
 

Private Member Functions

 Win32Heap ()
 default constructor not allowed
 

Private Attributes

HANDLE heap
 
const char * name
 

Constructor & Destructor Documentation

◆ Win32Heap() [1/2]

Win32::Win32Heap::Win32Heap ( const char * name,
size_t initialSize = 0,
size_t maxSize = 0 )

constructor (name must be static string!)

◆ ~Win32Heap()

Win32::Win32Heap::~Win32Heap ( )

destructor

◆ Win32Heap() [2/2]

Win32::Win32Heap::Win32Heap ( )
private

default constructor not allowed

Member Function Documentation

◆ Alloc()

__forceinline void * Win32::Win32Heap::Alloc ( size_t size)

allocate a block of memory from the heap

◆ Free()

__forceinline void Win32::Win32Heap::Free ( void * ptr)

free a block of memory which has been allocated from this heap

◆ GetName()

const char * Win32::Win32Heap::GetName ( ) const
inline

get heap name

◆ Realloc()

__forceinline void * Win32::Win32Heap::Realloc ( void * ptr,
size_t newSize )

re-allocate a block of memory

◆ Setup()

void Win32::Win32Heap::Setup ( )
static

static setup method (called by Core::SysFunc::Setup)

This method must be called at the beginning of the application before any threads are spawned.

Member Data Documentation

◆ heap

HANDLE Win32::Win32Heap::heap
private

◆ name

const char* Win32::Win32Heap::name
private

The documentation for this class was generated from the following files: