Furrballs v0.0.1
A Caching and Storage Solution
Loading...
Searching...
No Matches
MemoryManager Class Reference

#include <Furrballs.h>

Static Public Member Functions

static void * AllocateMemory (size_t totalSize)
 
static bool ProtectMemory (void *buffer, const size_t &size)
 
static void FreeMemory (void *buffer)
 Frees allocated buffer.
 
static size_t GetAvailableMemory ()
 Returns the available memory, works for both Windows and Unix.
 
static size_t GetLargestContiguousBlock ()
 Attempts to allocate increasingly larger blocks of memory until it fails, then returns the size of the largest successful allocation.
 

Detailed Description

Definition at line 33 of file Furrballs.h.

Member Function Documentation

◆ AllocateMemory()

static void * AllocateMemory ( size_t totalSize)
inlinestatic

Definition at line 38 of file Furrballs.h.

Referenced by MemoryManager::GetLargestContiguousBlock().

◆ FreeMemory()

static void FreeMemory ( void * buffer)
inlinestatic

FreeMemory is a blocking operation.

Definition at line 77 of file Furrballs.h.

Referenced by MemoryManager::GetLargestContiguousBlock().

◆ GetAvailableMemory()

static size_t GetAvailableMemory ( )
inlinestatic

Definition at line 88 of file Furrballs.h.

Referenced by FurrBall::CreateBall().

◆ GetLargestContiguousBlock()

static size_t GetLargestContiguousBlock ( )
inlinestatic

Definition at line 103 of file Furrballs.h.

◆ ProtectMemory()

static bool ProtectMemory ( void * buffer,
const size_t & size )
inlinestatic

Definition at line 56 of file Furrballs.h.


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