node_alloc

Class Hierarchy
C++
template <EAllocFreeType _alloc, bool __threads, int _Size>
class node_alloc;
File

CryMemoryAllocator.h

node_alloc::__pCurrentHugeBlock Data Member
C++
_Node_alloc_Mem_block_Huge * volatile __pCurrentHugeBlock;
node_alloc::_S_allocations Data Member
C++
LONG volatile _S_allocations;
Description

this one is needed for proper simple_alloc wrapping

node_alloc::_S_chunks Data Member
C++
_Node_alloc_Mem_block_Huge * volatile _S_chunks;
Description

static _Obj *_S_chunks;

node_alloc::_S_free_list Data Member
C++
_Obj * volatile _S_free_list[NFREELISTS];
node_alloc::_S_free_mem_blocks Data Member
C++
_Mem_block* volatile _S_free_mem_blocks;
node_alloc::_S_freelist_counter Data Member
C++
LONG volatile _S_freelist_counter[NFREELISTS];
node_alloc::_S_heap_size Data Member
C++
LONG volatile _S_heap_size;
Description

Amount of total allocated memory

node_alloc::_S_Node_tree Data Member
C++
_Node_Allocations_Tree<_Size> * volatile _S_Node_tree[NTREESCOUNT + 1];
node_alloc::_S_wasted_in_allocation Data Member
C++
LONG _S_wasted_in_allocation;
node_alloc::_S_wasted_in_blocks Data Member
C++
LONG _S_wasted_in_blocks;
node_alloc::_Find_binary_search Method
C++
static size_t _Find_binary_search(void * p, _Node_Allocations_Tree<_Size> * pBlock);
Description

PS3

node_alloc::_Find_right_size Method
C++
static size_t _Find_right_size(void * p);
node_alloc::_M_allocate Method
C++
static void * _M_allocate(size_t __n);
Description

Chunk allocation state.

node_alloc::_M_deallocate Method
C++
static void _M_deallocate(void * __p, size_t __n);
Description

p may not be 0

node_alloc::_Register_Huge_Block Method
C++
static void _Register_Huge_Block(_Node_Allocations_Tree<_Size> * pBlock);
node_alloc::_S_chunk_alloc Method
C++
static char* _S_chunk_alloc(size_t __p_size, int& __nobjs);
Description

Allocates a chunk for nobjs of size __p_size. nobjs may be reduced if it is inconvenient to allocate the requested number.

node_alloc::_S_fill_from_freelist Method
C++
static size_t _S_fill_from_freelist(int num, _Obj* first, _Obj* last, void **);
node_alloc::_S_freelist_count Method
C++
static size_t _S_freelist_count(int num);
node_alloc::_S_freelist_count_inside Method
C++
static size_t _S_freelist_count_inside(int num, _Obj* first, _Obj* last);
node_alloc::_S_freelist_delete_inside Method
C++
static void _S_freelist_delete_inside(int num, _Obj* first, _Obj* last);
node_alloc::_S_freelist_fill Method
C++
static size_t _S_freelist_fill(int num, void ** _ptr);
node_alloc::_S_freememblocks_count_inside Method
C++
static size_t _S_freememblocks_count_inside(int num, void* first, void* last);
node_alloc::_S_freememblocks_delete_inside Method
C++
static void _S_freememblocks_delete_inside(int num, void* first, void* last);
node_alloc::_S_get_free Method
C++
static size_t _S_get_free();
node_alloc::_S_refill Method
C++
static _Obj* _S_refill(size_t __n);
Description

Returns an object of size __n, and optionally adds to size __n free list.

node_alloc::_Unregister_Huge_Block Method
C++
static void _Unregister_Huge_Block(_Node_Allocations_Tree<_Size> * pBlock);
node_alloc::alloc Method
C++
static void * alloc(size_t __n);
node_alloc::allocate Method
C++
static void * allocate(size_t __n);
Description

n must be > 0

node_alloc::CanGuaranteeAlignment Method
C++
static bool CanGuaranteeAlignment(size_t nSize, size_t nAlignment);
node_alloc::cleanup Method
C++
static void cleanup();
node_alloc::dealloc Method (void *)
C++
static size_t dealloc(void * __p);
node_alloc::dealloc Method (void *, size_t)
C++
static size_t dealloc(void * __p, size_t __n);
node_alloc::deallocate Method (void *)
C++
static size_t deallocate(void * __p);
Description

p may not be 0

node_alloc::deallocate Method (void *, size_t)
C++
static size_t deallocate(void * __p, size_t __n);
node_alloc::get_heap_size Method
C++
static size_t get_heap_size();
Description

__n must be > 0 static void * alloc(size_t __n) { return (__n > (size_t)__MAX_BYTES) ? Node_Allocator

node_alloc::get_wasted_in_allocation Method
C++
static size_t get_wasted_in_allocation();
node_alloc::get_wasted_in_blocks Method
C++
static size_t get_wasted_in_blocks();
node_alloc::getSize Method
C++
static size_t getSize(void * __p);
node_alloc::getSizeEx Method
C++
static size_t getSizeEx(void * __p);
Description

Helper method to retrieve the size of allocations only within the node allocator. If the memory block does not originate from within the node allocator, 0 is returned. important for PS3(talk to Chris Raine for details)

node_alloc::IsInAddressRange Method
C++
static bool IsInAddressRange(void* p);
node_alloc::Register_Small_Block Method
C++
static void Register_Small_Block(void * pObj, size_t count, size_t _n);
node_alloc::releaseMemory Method
C++
static void releaseMemory();
node_alloc::_Mem_block Nested Type
C++
typedef _Node_alloc_Mem_block<_Size> _Mem_block;
node_alloc::_Obj Nested Type
C++
typedef _Node_alloc_obj _Obj;
node_alloc::value_type Nested Type
C++
typedef char value_type;