diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-09 21:21:21 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-04-09 21:21:21 +0000 |
commit | 49f429132a0d41ef6d6d58dec4fb735c5decc5a5 (patch) | |
tree | d764369ec52fd77727d164e21e8ec072ebd0180e /ace/Malloc_T.i | |
parent | 7fde5f76146c6c3aed3f0a302192ef0e32cf2b12 (diff) | |
download | ATCD-49f429132a0d41ef6d6d58dec4fb735c5decc5a5.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Malloc_T.i')
-rw-r--r-- | ace/Malloc_T.i | 111 |
1 files changed, 1 insertions, 110 deletions
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i index fe08e15ff36..9a5cc1cc8b2 100644 --- a/ace/Malloc_T.i +++ b/ace/Malloc_T.i @@ -186,115 +186,6 @@ ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::protect (void *addr, size_t len, int flags template <size_t POOL_SIZE> ACE_INLINE ACE_Static_Allocator<POOL_SIZE>::ACE_Static_Allocator (void) - : offset_ (0) + : ACE_Static_Allocator_Base (this->pool_, POOL_SIZE) { } - -template <size_t POOL_SIZE> ACE_INLINE void * -ACE_Static_Allocator<POOL_SIZE>::malloc (size_t nbytes) -{ - if (this->offset_ + nbytes > POOL_SIZE) - { - errno = ENOMEM; - return 0; - } - else - { - char *ptr = &this->pool_[this->offset_]; - - this->offset_ += nbytes; - - return (void *) ptr; - } -} - -template <size_t POOL_SIZE> ACE_INLINE void * -ACE_Static_Allocator<POOL_SIZE>::calloc (size_t nbytes, - char initial_value) -{ - void *ptr = this->malloc (nbytes); - - ACE_OS::memset (ptr, initial_value, nbytes); - return (void *) ptr; -} - -template <size_t POOL_SIZE> ACE_INLINE void -ACE_Static_Allocator<POOL_SIZE>::free (void *ptr) -{ - // no-op! - // @@ We could check to see if ptr is within our pool?! -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::remove (void) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::bind (const char *, void *, int) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::trybind (const char *, void *&) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::find (const char *, void *&) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::find (const char *) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::unbind (const char *) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::unbind (const char *, void *&) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::sync (ssize_t, int) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::sync (void *, size_t, int) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::protect (ssize_t, int) -{ - return -1; -} - -template <size_t POOL_SIZE> ACE_INLINE int -ACE_Static_Allocator<POOL_SIZE>::protect (void *, size_t, int) -{ - return -1; -} - -#if defined (ACE_HAS_MALLOC_STATS) -template <size_t POOL_SIZE> ACE_INLINE void -ACE_Static_Allocator<POOL_SIZE>::print_stats (void) const -{ -} -#endif /* ACE_HAS_MALLOC_STATS */ - |