diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-10-27 21:44:14 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-10-27 21:44:14 +0000 |
commit | 0cc5504a5c8a958101a09accb21c135281d5e9ff (patch) | |
tree | a38b7d21b5f25b5ef5548a423339c747f056059c /ace/Malloc_T.cpp | |
parent | 997479406012dab3e5e787d3a724bf5f2fd2b04c (diff) | |
download | ATCD-0cc5504a5c8a958101a09accb21c135281d5e9ff.tar.gz |
Jamming!
Diffstat (limited to 'ace/Malloc_T.cpp')
-rw-r--r-- | ace/Malloc_T.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index b8263d05954..23832860b88 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -14,14 +14,6 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Malloc) template <class MALLOC> -ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const char *pool_name, - const char *lock_name) - : allocator_ (pool_name, lock_name) -{ - ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); -} - -template <class MALLOC> ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter (const char *pool_name) : allocator_ (pool_name) { @@ -161,23 +153,29 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc (const char *pool_name) this->open (); } -template <ACE_MEM_POOL_1, class LOCK> +template <ACE_MEM_POOL_1, class LOCK> ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc (const char *pool_name, - const char *lock_name) - : memory_pool_ (pool_name), + const char *lock_name, + const ACE_MEM_POOL_OPTIONS *options) + : memory_pool_ (pool_name, options), lock_ (lock_name) { ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc"); this->open (); } - : memory_pool_ (options, pool_name), - lock_ (pool_name == 0 ? 0 : ACE::basename (pool_name, - ACE_DIRECTORY_SEPARATOR_CHAR)) +#if !defined (ACE_HAS_TEMPLATE_TYPEDEFS) +template <ACE_MEM_POOL_1, class LOCK> +ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc (const char *pool_name, + const char *lock_name, + const void *options) + : memory_pool_ (pool_name, (const ACE_MEM_POOL_OPTIONS *) options), + lock_ (lock_name) { ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::ACE_Malloc"); this->open (); } +#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */ // Clean up the resources allocated by ACE_Malloc. @@ -215,7 +213,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::shared_malloc (size_t nbytes) // Begin the search starting at the place in the freelist // where the last block was found. ACE_Malloc_Header *prevp = this->cb_ptr_->freep_; - ACE_Malloc_Header *currp = prevp->s_.next_block_; + ACE_Malloc_Header *currp = prevp->s_.next_block_; // Search the freelist to locate a block of the appropriate size. @@ -284,7 +282,7 @@ ACE_Malloc<ACE_MEM_POOL_2, LOCK>::malloc (size_t nbytes) template <ACE_MEM_POOL_1, class LOCK> void * ACE_Malloc<ACE_MEM_POOL_2, LOCK>::calloc (size_t nbytes, - char initial_value) + char initial_value) { ACE_TRACE ("ACE_Malloc<ACE_MEM_POOL_2, LOCK>::calloc"); void *ptr = this->malloc (nbytes); @@ -508,7 +506,7 @@ ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::dump (void) const template <ACE_MEM_POOL_1, class LOCK> ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::ACE_Malloc_Iterator (ACE_Malloc<ACE_MEM_POOL_2, LOCK> &malloc, - const char *name) + const char *name) : malloc_ (malloc), guard_ (malloc_.lock_), curr_ (0), |