diff options
author | Steve Huston <shuston@riverace.com> | 2007-06-27 14:03:35 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2007-06-27 14:03:35 +0000 |
commit | c0df506b6defcd68f74f8bc30070b7a4445bba15 (patch) | |
tree | 80af803129ea4a49f37dfeb9edfd3fbd9bd7e9ec /ACE/ace/Malloc_T.h | |
parent | d30e39506e4831cc86f73354c6e120b7fd883463 (diff) | |
download | ATCD-c0df506b6defcd68f74f8bc30070b7a4445bba15.tar.gz |
ChangeLogTag:Wed Jun 27 13:54:35 UTC 2007 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/ace/Malloc_T.h')
-rw-r--r-- | ACE/ace/Malloc_T.h | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/ACE/ace/Malloc_T.h b/ACE/ace/Malloc_T.h index 7ae6d4fceb7..e7e452c3bfb 100644 --- a/ACE/ace/Malloc_T.h +++ b/ACE/ace/Malloc_T.h @@ -204,7 +204,7 @@ private: /** * @class ACE_Allocator_Adapter * - * @brief This class is an Adapter that allows the ACE_Allocator to + * @brief This class is an adapter that allows the ACE_Allocator to * use the ACE_Malloc class below. */ template <class MALLOC> @@ -412,22 +412,42 @@ class ACE_Malloc_FIFO_Iterator_T; /** * @class ACE_Malloc_T * - * @brief Define a C++ class that uses parameterized types to provide - * an extensible mechanism for encapsulating various of dynamic + * @brief A class template that uses parameterized types to provide + * an extensible mechanism for encapsulating various dynamic * memory management strategies. * * This class can be configured flexibly with different * MEMORY_POOL strategies and different types of ACE_LOCK - * strategies that support the @a ACE_Thread_Mutex and @a - * ACE_Process_Mutex constructor API. + * strategies that support the ACE_Thread_Mutex and ACE_Process_Mutex + * constructor API. + * + * Common MEMORY_POOL strategies to use with this class are: + * - ACE_Local_Memory_Pool + * - ACE_MMAP_Memory_Pool + * - ACE_Pagefile_Memory_Pool + * - ACE_Shared_Memory_Pool + * - ACE_Sbrk_Memory_Pool + * + * The MEMORY_POOL class must provide the following methods: + * - constructor (const ACE_TCHAR *pool_name) + * - constructor (const ACE_TCHAR *pool_name, const MEMORY_POOL_OPTIONS *options) + * - void dump (void) const (needed if ACE is built with ACE_HAS_DUMP defined) + * - void *init_acquire (size_t nbytes, size_t &rounded_bytes, int &first_time); + * - int release (void) + * - void *acquire (size_t nbytes, size_t &rounded_bytes) + * - void *base_addr (void) + * - seh_selector() (only needed on Windows) * - * Note that the @a bind() and @a find() methods use linear search, so + * Note that the ACE_Allocator_Adapter class can be used to integrate allocator + * classes which do not meet the interface requirements of ACE_Malloc_T. + * + * @Note The bind() and find() methods use linear search, so * it's not a good idea to use them for managing a large number of * entities. If you need to manage a large number of entities, it's - * recommended that you @a bind() an @ ACE_Hash_Map_Manager that - * resides in shared memory, use @a find() to locate it, and then + * recommended that you bind() an ACE_Hash_Map_Manager that + * resides in shared memory, use find() to locate it, and then * store/retrieve the entities in the hash map. - * */ + */ template <ACE_MEM_POOL_1, class ACE_LOCK, class ACE_CB> class ACE_Malloc_T { |