Nebula
Loading...
Searching...
No Matches
win32memoryconfig.h File Reference

Detailed Description

Central config file for memory setup on the Win32 platform.

#include "core/config.h"
#include "core/debug.h"

Go to the source code of this file.

Namespaces

namespace  Memory
 Allocates memory using the TLSF method (http://www.gii.upv.es/tlsf/files/ecrts04_tlsf.pdf), with extended handling of padding to better suit GPUs.
 

Enumerations

enum  Memory::HeapType {
  Memory::DefaultHeap = 0 , Memory::ObjectHeap , Memory::ObjectArrayHeap , Memory::ResourceHeap ,
  Memory::ScratchHeap , Memory::StringDataHeap , Memory::StreamDataHeap , Memory::PhysicsHeap ,
  Memory::AppHeap , Memory::NumHeapTypes , Memory::InvalidHeapType , Memory::DefaultHeap = 0 ,
  Memory::ObjectHeap , Memory::ObjectArrayHeap , Memory::ResourceHeap , Memory::ScratchHeap ,
  Memory::StringDataHeap , Memory::StreamDataHeap , Memory::PhysicsHeap , Memory::AppHeap ,
  Memory::NetworkHeap , Memory::ScriptingHeap , Memory::NumHeapTypes , Memory::InvalidHeapType ,
  Memory::DefaultHeap = 0 , Memory::ObjectHeap , Memory::ObjectArrayHeap , Memory::ResourceHeap ,
  Memory::ScratchHeap , Memory::StringDataHeap , Memory::StreamDataHeap , Memory::PhysicsHeap ,
  Memory::AppHeap , Memory::NetworkHeap , Memory::ScriptingHeap , Memory::NumHeapTypes ,
  Memory::InvalidHeapType
}
 Heap types are defined here. More...
 

Functions

void Memory::SetupHeaps ()
 Setup the global heaps.
 
const char * Memory::GetHeapTypeName (HeapType heapType)
 Returns a human readable name for a heap type.
 
__forceinline unsigned char * Memory::__HeapAlignPointerAndWritePadding16 (unsigned char *ptr)
 Global PoolArrayAllocator objects, these are all setup in a central place in the Memory::SetupHeaps() function!
 
__forceinline unsigned char * Memory::__HeapUnalignPointer16 (unsigned char *ptr)
 Helper function for Heap16 functions: "un-aligns" pointer through the padding mask stored in the byte before the pointer.
 
__forceinline LPVOID Memory::__HeapAlloc16 (HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes)
 HeapAlloc replacement which always returns 16-byte aligned addresses.
 
__forceinline LPVOID Memory::__HeapReAlloc16 (HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T dwBytes)
 HeapReAlloc replacement for 16-byte alignment.
 
__forceinline BOOL Memory::__HeapFree16 (HANDLE hHeap, DWORD dwFlags, LPVOID lpMem)
 HeapFree replacement which always returns 16-byte aligned addresses.
 
__forceinline SIZE_T Memory::__HeapSize16 (HANDLE hHeap, DWORD dwFlags, LPCVOID lpMem)
 HeapSize replacement function.