Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Burger::MemoryManagerGlobalANSI Class Reference

Global ANSI Memory Manager helper class. More...

Inheritance diagram for Burger::MemoryManagerGlobalANSI:
Inheritance graph
[legend]
Collaboration diagram for Burger::MemoryManagerGlobalANSI:
Collaboration graph
[legend]

Public Member Functions

 MemoryManagerGlobalANSI () noexcept
 Attaches a MemoryManagerANSI class to the global memory manager.
 
 ~MemoryManagerGlobalANSI ()
 Releases a MemoryManagerANSI class from the global memory manager.
 
- Public Member Functions inherited from Burger::MemoryManagerANSI
 MemoryManagerANSI () noexcept
 Constructor for the ANSI memory allocator.
 
voidalloc (uintptr_t uSize) noexcept
 Allocates memory.
 
void free (const void *pInput) noexcept
 Frees memory.
 
voidrealloc (const void *pInput, uintptr_t uSize) noexcept
 Reallocates memory.
 
- Public Member Functions inherited from Burger::MemoryManager
voidalloc (uintptr_t uSize) noexcept
 Allocate memory.
 
void free (const void *pInput) noexcept
 Release memory.
 
voidrealloc (const void *pInput, uintptr_t uSize) noexcept
 Reallocate memory.
 
void shutdown (void) noexcept
 Shut down the memory manager.
 
voidalloc_clear (uintptr_t uSize) noexcept
 Allocate a block of pre-zeroed memory.
 

Protected Attributes

MemoryManagerm_pPrevious
 Pointer to the previous memory manager.
 

Private Member Functions

 MemoryManagerGlobalANSI (const MemoryManagerGlobalANSI &)=delete
 
MemoryManagerGlobalANSIoperator= (const MemoryManagerGlobalANSI &)=delete
 
 MemoryManagerGlobalANSI (MemoryManagerGlobalANSI &&)=delete
 
MemoryManagerGlobalANSIoperator= (MemoryManagerGlobalANSI &&)=delete
 

Additional Inherited Members

- Public Types inherited from Burger::MemoryManager
typedef void *(* ProcAlloc) (MemoryManager *pThis, uintptr_t uSize)
 Function prototype for allocating memory.
 
typedef void(* ProcFree) (MemoryManager *pThis, const void *pInput)
 Function prototype for releasing memory.
 
typedef void *(* ProcRealloc) (MemoryManager *pThis, const void *pInput, uintptr_t uSize)
 Function prototype for reallocating memory.
 
typedef void(* ProcShutdown) (MemoryManager *pThis)
 Function prototype for destructor.
 
- Static Public Member Functions inherited from Burger::MemoryManager
static void shutdown (MemoryManager *pThis) noexcept
 Default memory manager destructor.
 
- Public Attributes inherited from Burger::MemoryManager
ProcAlloc m_pAlloc
 Pointer to allocation function.
 
ProcFree m_pFree
 Pointer to memory release function.
 
ProcRealloc m_pRealloc
 Pointer to the memory reallocation function.
 
ProcShutdown m_pShutdown
 Pointer to the shutdown function.
 
- Static Protected Member Functions inherited from Burger::MemoryManagerANSI
static voidalloc (MemoryManager *pThis, uintptr_t uSize) noexcept
 Calls malloc().
 
static void free (MemoryManager *pThis, const void *pInput) noexcept
 Calls free().
 
static voidrealloc (MemoryManager *pThis, const void *pInput, uintptr_t uSize) noexcept
 Calls realloc().
 

Detailed Description

Global ANSI Memory Manager helper class.


This class is a helper that attaches a MemoryManagerANSI class to the global memory manager. When this instance shuts down, it will remove itself from the global memory manager and set the global memory manager to the previous one.

See also
GlobalMemoryManager

Constructor & Destructor Documentation

◆ MemoryManagerGlobalANSI() [1/3]

Burger::MemoryManagerGlobalANSI::MemoryManagerGlobalANSI ( const MemoryManagerGlobalANSI & )
privatedelete

◆ MemoryManagerGlobalANSI() [2/3]

Burger::MemoryManagerGlobalANSI::MemoryManagerGlobalANSI ( MemoryManagerGlobalANSI && )
privatedelete

◆ MemoryManagerGlobalANSI() [3/3]

Burger::MemoryManagerGlobalANSI::MemoryManagerGlobalANSI ( )
noexcept

Attaches a MemoryManagerANSI class to the global memory manager.


When this class is created, it will automatically attach itself to the global memory manager and save the pointer to the previous instantiation so when this class goes out of scope, the previous memory manager is reinstated

Example...

{
// Tell Burgerlib to use ANSI memory chunks
// When going out of scope, HandleBasedMemory is restored
}
int main(int,char **)
{
// Use handle based memory
return 0;
}
Global ANSI Memory Manager helper class.
Definition burger.h:5597
Global Handle Memory Manager helper class.
Definition burger.h:10330
int BURGER_ANSIAPI main(int argc, const char **argv)
Definition detectlaunch.cpp:30
Select a type based if the conditional is true or false.
Definition burger.h:3178

◆ ~MemoryManagerGlobalANSI()

Burger::MemoryManagerGlobalANSI::~MemoryManagerGlobalANSI ( )

Releases a MemoryManagerANSI class from the global memory manager.


When this class is released, it will automatically remove itself to the global memory manager and restore the previous memory manager to the global memory manager.

See also
MemoryManagerGlobalANSI(), or GlobalMemoryManager

Member Function Documentation

◆ operator=() [1/2]

MemoryManagerGlobalANSI & Burger::MemoryManagerGlobalANSI::operator= ( const MemoryManagerGlobalANSI & )
privatedelete

◆ operator=() [2/2]

MemoryManagerGlobalANSI & Burger::MemoryManagerGlobalANSI::operator= ( MemoryManagerGlobalANSI && )
privatedelete

Member Data Documentation

◆ m_pPrevious

MemoryManager* Burger::MemoryManagerGlobalANSI::m_pPrevious
protected

Pointer to the previous memory manager.