summaryrefslogtreecommitdiff
path: root/ace/Malloc_T.i
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-12-03 00:06:36 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-12-03 00:06:36 +0000
commit783f9634c13a4e51e77db9dd376df5fce1140087 (patch)
treed128af9aaf93acd3c0ccd2e73916e0ea6c4cd6de /ace/Malloc_T.i
parentabaf271c6378ae9fc013cd8ef47744d7881abbda (diff)
downloadATCD-783f9634c13a4e51e77db9dd376df5fce1140087.tar.gz
ChangeLogTag:Thu Dec 02 18:03:27 1999 Nanbor Wang <nanbor@cs.wustl.edu>
Diffstat (limited to 'ace/Malloc_T.i')
-rw-r--r--ace/Malloc_T.i36
1 files changed, 22 insertions, 14 deletions
diff --git a/ace/Malloc_T.i b/ace/Malloc_T.i
index 1aa95daf876..a7c3f25280c 100644
--- a/ace/Malloc_T.i
+++ b/ace/Malloc_T.i
@@ -3,7 +3,7 @@
// Malloc_T.i
-template <class T> ACE_INLINE T *
+template <class T> ACE_INLINE T *
ACE_Cached_Mem_Pool_Node<T>::addr (void)
{
// This should be done using a single reinterpret_cast, but Sun/CC
@@ -13,7 +13,7 @@ ACE_Cached_Mem_Pool_Node<T>::addr (void)
}
template <class T> ACE_INLINE ACE_Cached_Mem_Pool_Node<T> *
-ACE_Cached_Mem_Pool_Node<T>::get_next (void)
+ACE_Cached_Mem_Pool_Node<T>::get_next (void)
{
return this->next_;
}
@@ -44,22 +44,22 @@ ACE_Cached_Allocator<T, ACE_LOCK>::free (void * ptr)
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_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>::alloc (void)
-{
+{
ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::allocator");
return this->allocator_;
}
@@ -79,25 +79,25 @@ ACE_Allocator_Adapter<MALLOC>::remove (void)
}
template <class MALLOC> ACE_INLINE int
-ACE_Allocator_Adapter<MALLOC>::trybind (const char *name,
- void *&pointer)
+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_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_Allocator_Adapter<MALLOC>::find (const char *name,
+ void *&pointer)
{
ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::find");
return this->allocator_.find (name, pointer);
@@ -198,3 +198,11 @@ ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::mutex (void)
{
return this->lock_;
}
+
+template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_INLINE void
+ACE_Malloc<ACE_MEM_POOL_2, ACE_LOCK>::init_malloc_header_ptr (void* ptr)
+{
+#if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC)
+ new (ptr) ACE_MALLOC_HEADER_PTR;
+#endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */
+}