cocos2d-x  3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AllocatorStrategyPool< T, O, locking_traits > Class Template Reference

#include <CCAllocatorStrategyPool.h>

Inheritance diagram for AllocatorStrategyPool< T, O, locking_traits >:
AllocatorStrategyFixedBlock< sizeof(T), O::alignment, locking_traits > AllocatorBase

Public Types

typedef T value_type
typedef value_typepointer
typedef
AllocatorStrategyFixedBlock
< sizeof(T), O::alignment,
locking_traits > 
tParentStrategy
- Public Types inherited from AllocatorBase
enum  { kDefaultAlignment = 16 }
 
typedef void * pointer

Public Member Functions

 AllocatorStrategyPool (const char *tag=nullptr, size_t poolSize=100)
CC_ALLOCATOR_INLINE void * allocate (size_t size)
CC_ALLOCATOR_INLINE void deallocate (void *address, size_t size=0)
- Public Member Functions inherited from AllocatorStrategyFixedBlock< sizeof(T), O::alignment, locking_traits >
 AllocatorStrategyFixedBlock (const char *tag=nullptr, size_t pageSize=100)
 AllocatorStrategyFixedBlock ( var nullptr, var 100)
 AllocatorStrategyFixedBlock ( local nullptr, local 100)
virtual ~AllocatorStrategyFixedBlock ()
var ~AllocatorStrategyFixedBlock ()
local ~AllocatorStrategyFixedBlock ()
CC_ALLOCATOR_INLINE void * allocate (size_t size)
var allocate ( var size)
local allocate ( local size)
CC_ALLOCATOR_INLINE void deallocate (void *address, size_t size=0)
var deallocate ( var address, var 0)
local deallocate ( local address, local 0)
CC_ALLOCATOR_INLINE bool owns (const void *const address)
var owns ( var address)
local owns ( local address)

Additional Inherited Members

- Static Public Attributes inherited from AllocatorStrategyFixedBlock< sizeof(T), O::alignment, locking_traits >
static const size_t block_size
var block_size
local block_size
static const size_t alignment
var alignment
local alignment
- Protected Member Functions inherited from AllocatorStrategyFixedBlock< sizeof(T), O::alignment, locking_traits >
CC_ALLOCATOR_INLINE void push_front (void *block)
var push_front ( var block)
local push_front ( local block)
CC_ALLOCATOR_INLINE void * pop_front ()
var pop_front ()
local pop_front ()
const size_t pageSize () const
var pageSize ()
local pageSize ()
CC_ALLOCATOR_INLINE void allocatePage ()
var allocatePage ()
local allocatePage ()
- Protected Attributes inherited from AllocatorStrategyFixedBlock< sizeof(T), O::alignment, locking_traits >
void * _list
var _list
local _list
void * _pages
var _pages
local _pages
size_t _pageSize
var _pageSize
local _pageSize
size_t _allocated
var _allocated
local _allocated

Member Typedef Documentation

typedef value_type* pointer
typedef
AllocatorStrategyFixedBlock
<sizeof(T), O::alignment,
locking_traits>
tParentStrategy
typedef T value_type

Constructor & Destructor Documentation

AllocatorStrategyPool ( const char *  tag = nullptr,
size_t  poolSize = 100 
)
inline

Member Function Documentation

CC_ALLOCATOR_INLINE void* allocate ( size_t  size)
inline
CC_ALLOCATOR_INLINE void deallocate ( void *  address,
size_t  size = 0 
)
inline

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