Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Friends | List of all members
MemoryAllocator Class Reference
Inheritance diagram for MemoryAllocator:
Memory PageManager

Public Member Functions

void print (const char *msg)
 
void print_leaks (int page)
 
virtual INodeUint32 get_id () const
 
virtual const CoreStringget_name () const
 
virtual INodeUint64 get_peak_memory_usage () const
 
virtual INodeUint64 get_current_memory_usage () const
 
virtual INodeUint64 get_data_alignment () const
 
void * allocate (DataType &object, INodeUint32 nobjects, const char *trace="")
 
void allocate (DataType &object, MemoryTag &tag, void *&data, INodeUint32 nobjects)
 
void * reallocate (DataType &object, INodeUint32 nobjects, void *data, const char *trace="")
 
void reallocate (DataType &object, MemoryTag &tag, void *&data, INodeUint32 nobjects)
 
void destroy (MemoryTag &tag, void *&data)
 
void destroy (DataType &object, void *data)
 
- Public Member Functions inherited from PageManager
void print (const char *msg="")
 
void print_page (INodeUint32 page, const char *msg="")
 
INodeUint32 get_page_count () const
 
INodeUint32 get_active_page_count () const
 
INodeUint32 get_page_min_size () const
 
INodeUint32 get_page_max_size () const
 
INodeUint64 get_peak_usage () const
 
INodeUint64 get_current_usage () const
 
INodeUint64 get_item_alignment () const
 
INodeUint32 get_item_count (INodeUint64 nbytes) const
 
INodeUint64 get_byte_count (INodeUint64 nitems) const
 
INodeUint64 get_page_size_bytes (INodeUint32 page) const
 
INodeUint64 get_page_size_used_bytes (INodeUint32 page) const
 
const CoreStringget_description () const
 
bool is_page_monolithic (INodeUint32 page) const
 
bool is_page_full (INodeUint32 page) const
 
bool is_page_empty (INodeUint32 page) const
 
INodeUint64 get_page_size (INodeUint32 page) const
 
INodeUint64 get_page_size_used (INodeUint32 page) const
 

Friends

class MemoryManager
 

Additional Inherited Members

- Public Types inherited from Memory
enum  {
  kDefaultMinPageSizeBytes = 16*1024,
  kDefaultMaxPageSizeBytes = 1024*1024*1024
}
 
- Static Public Member Functions inherited from Memory
static Memoryget_allocator (const CoreString &name, INodeUint32 alignment, INodeUint64 page_size_min_bytes=kDefaultMinPageSizeBytes, INodeUint64 page_size_max_bytes=kDefaultMaxPageSizeBytes)
 
static Memoryget_owner (void *data)
 
static Memoryget_owner (MemoryTag tag)
 
static MemoryTagget_tag (void *data)
 
static INodeUint64 get_byte_count (void *data)
 
static void * allocate (Memory *memory, DataType &object, INodeUint32 nobjects, const char *trace="")
 
static void * reallocate (Memory *memory, DataType &object, INodeUint32 nobjects, void *data, const char *trace="")
 
static void allocate (Memory *memory, DataType &object, MemoryTag &tag, void *&data, INodeUint32 nobjects)
 
static void reallocate (Memory *memory, DataType &object, MemoryTag &tag, void *&data, INodeUint32 nobjects)
 
static void destroy (MemoryTag &tag, void *&data)
 
static void destroy (void *&data)
 
static void destroy (DataType &object, void *&data)
 
- Protected Member Functions inherited from PageManager
 PageManager (const CoreString &_description, INodeUint32 item_alignment, INodeUint64 page_min_bytes, INodeUint64 page_max_bytes)
 
int take_span_new_page (INodeUint32 required_size, INodeUint32 new_page_size)
 
Slot take_span (INodeUint32 required_size)
 
void release_span (Slot slot, INodeUint32 size)
 
void release_span_lazy (Slot slot, INodeUint32 size)
 
void inc_item_usage (INodeUint32 nitems)
 
void dec_item_usage (INodeUint32 nitems)
 
Pageget_pages ()
 
Pageget_page (INodeUint32 i)
 
const Pageget_page (INodeUint32 i) const
 
void add_page_to_bucket (int page, int bucket)
 
void remove_page_from_bucket (int page, int bucket_idx)
 
void remove_page_from_bucket_conditional (int page, int bucket_idx)
 
void destroy_page_image (INodeUint32 i)