diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-10-21 21:41:34 +0000 |
commit | a5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch) | |
tree | bcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/Malloc_T.i | |
download | ATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz |
Initial revision
Diffstat (limited to 'ace/Malloc_T.i')
-rw-r--r-- | ace/Malloc_T.i | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i new file mode 100644 index 00000000000..a66cb7ef7fd --- /dev/null +++ b/ace/Malloc_T.i @@ -0,0 +1,150 @@ +/* -*- C++ -*- */ +// $Id$ + +// Malloc_T.i + +template <class MALLOC> ACE_INLINE void * +ACE_Allocator_Adapter<MALLOC>::malloc (size_t nbytes) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::malloc"); + return this->allocator_.malloc (nbytes); +} + +template <class MALLOC> ACE_INLINE void * +ACE_Allocator_Adapter<MALLOC>::calloc (size_t nbytes, + char initial_value) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::malloc"); + return this->allocator_.calloc (nbytes, initial_value); +} + +template <class MALLOC> ACE_INLINE MALLOC & +ACE_Allocator_Adapter<MALLOC>::allocator (void) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::allocator"); + return this->allocator_; +} + +template <class MALLOC> ACE_INLINE void +ACE_Allocator_Adapter<MALLOC>::free (void *ptr) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::free"); + this->allocator_.free (ptr); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::remove (void) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::remove"); + return this->allocator_.remove (); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::trybind (const char *name, + void *&pointer) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::trybind"); + return this->allocator_.trybind (name, pointer); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::bind (const char *name, + void *pointer, + int duplicates) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::bind"); + return this->allocator_.bind (name, pointer, duplicates); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::find (const char *name, + void *&pointer) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::find"); + return this->allocator_.find (name, pointer); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::find (const char *name) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::find"); + return this->allocator_.find (name); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::unbind (const char *name, void *&pointer) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::unbind"); + return this->allocator_.unbind (name, pointer); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::unbind (const char *name) +{ + ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::unbind"); + return this->allocator_.unbind (name); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::sync (ssize_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::sync"); + return this->allocator_.sync (len, flags); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::sync (void *addr, size_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::sync"); + return this->allocator_.sync (addr, len, flags); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::protect (ssize_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::protect"); + return this->allocator_.protect (len, flags); +} + +template <class MALLOC> ACE_INLINE int +ACE_Allocator_Adapter<MALLOC>::protect (void *addr, size_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::protect"); + return this->allocator_.protect (addr, len, flags); +} + +template <class MEM_POOL, class LOCK> MEM_POOL & +ACE_Malloc<MEM_POOL, LOCK>::memory_pool (void) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::memory_pool"); + return this->memory_pool_; +} + +template <class MEM_POOL, class LOCK> int +ACE_Malloc<MEM_POOL, LOCK>::sync (ssize_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::sync"); + return this->memory_pool_.sync (len, flags); +} + +template <class MEM_POOL, class LOCK> int +ACE_Malloc<MEM_POOL, LOCK>::sync (void *addr, size_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::sync"); + return this->memory_pool_.sync (addr, len, flags); +} + +template <class MEM_POOL, class LOCK> int +ACE_Malloc<MEM_POOL, LOCK>::protect (ssize_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::protect"); + return this->memory_pool_.protect (len, flags); +} + +template <class MEM_POOL, class LOCK> int +ACE_Malloc<MEM_POOL, LOCK>::protect (void *addr, size_t len, int flags) +{ + ACE_TRACE ("ACE_Malloc<MEMORY_POOL, LOCK>::protect"); + return this->memory_pool_.protect (addr, len, flags); +} + |