UCommon
memory.h File Reference

Private heaps, pools, and associations. More...

#include <ucommon/platform.h>
#include <ucommon/protocols.h>
#include <ucommon/linked.h>
#include <ucommon/string.h>
Include dependency graph for memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  ucommon::autorelease
 Create a linked list of auto-releasable objects. More...
 
class  ucommon::DirPager
 Directory pager is a paged string list for directory file names. More...
 
class  ucommon::memalloc
 A memory protocol pager for private heap manager. More...
 
class  ucommon::mempager
 A managed private heap for small allocations. More...
 
class  ucommon::pager< T >
 Mempager managed type factory for pager pool objects. More...
 
class  ucommon::PagerObject
 This is a base class for objects that may be created in pager pools. More...
 
class  ucommon::PagerPool
 Pager pool base class for managed memory pools. More...
 
class  ucommon::StringPager
 String pager for storing lists of NULL terminated strings. More...
 
class  ucommon::StringPager::member
 Member of string list. More...
 

Namespaces

namespace  ucommon
 Common namespace for all ucommon objects.
 

Typedefs

typedef DirPager ucommon::dirlist_t
 A convenience type for using DirPager directly.
 
typedef StringPager ucommon::stringlist_t
 A convenience type for paged string lists.
 
typedef StringPager::member ucommon::stringlistitem_t
 A convenience type for paged string list items.
 

Functions

String ucommon::str (StringPager &list, const char *prefix=NULL, const char *middle=NULL, const char *suffix=NULL)
 

Detailed Description

Private heaps, pools, and associations.

Private heaps often can reduce locking contention in threaded applications since they do not require using the global "malloc" function. Private heaps also can be used as auto-release heaps, where all memory allocated and handled out for small objects can be automatically released all at once. Pager pools are used to optimize system allocation around page boundaries. Associations allow private memory to be tagged and found by string identifiers.

Definition in file memory.h.