#include <Malloc_T.h>
Inheritance diagram for ACE_Allocator_Adapter< MALLOC >:


Public Types | |
| typedef MALLOC | ALLOCATOR | 
| typedef const MALLOC::MEMORY_POOL_OPTIONS * | MEMORY_POOL_OPTIONS | 
Public Member Functions | |
| ACE_Allocator_Adapter (const char *pool_name=0) | |
| ACE_Allocator_Adapter (const char *pool_name, const char *lock_name, MEMORY_POOL_OPTIONS options=0) | |
| ACE_Allocator_Adapter (const wchar_t *pool_name) | |
| ACE_Allocator_Adapter (const wchar_t *pool_name, const wchar_t *lock_name, MEMORY_POOL_OPTIONS options=0) | |
| virtual | ~ACE_Allocator_Adapter (void) | 
| Destructor.   | |
| virtual void * | malloc (size_t nbytes) | 
| Allocate nbytes, but don't give them any initial value.   | |
| virtual void * | calloc (size_t nbytes, char initial_value= '\0') | 
| Allocate nbytes, giving them all an initial_value.   | |
| virtual void * | calloc (size_t n_elem, size_t elem_size, char initial_value= '\0') | 
| virtual void | free (void *ptr) | 
| Free ptr (must have been allocated by ACE_Allocator::malloc()).   | |
| virtual int | remove (void) | 
| Remove any resources associated with this memory manager.   | |
| virtual int | bind (const char *name, void *pointer, int duplicates=0) | 
| virtual int | trybind (const char *name, void *&pointer) | 
| virtual int | find (const char *name, void *&pointer) | 
| virtual int | find (const char *name) | 
| Returns 0 if the name is in the mapping and -1 if not.   | |
| virtual int | unbind (const char *name) | 
| virtual int | unbind (const char *name, void *&pointer) | 
| virtual int | sync (ssize_t len=-1, int flags=MS_SYNC) | 
| virtual int | sync (void *addr, size_t len, int flags=MS_SYNC) | 
| virtual int | protect (ssize_t len=-1, int prot=PROT_RDWR) | 
| virtual int | protect (void *addr, size_t len, int prot=PROT_RDWR) | 
| ALLOCATOR & | alloc (void) | 
| Returns the underlying allocator.   | |
| virtual void | dump (void) const | 
| Dump the state of the object.   | |
Private Attributes | |
| ALLOCATOR | allocator_ | 
| ALLOCATOR instance, which is owned by the adapter.   | |
Definition at line 211 of file Malloc_T.h.
      
  | 
  |||||
| 
 
 Definition at line 215 of file Malloc_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 220 of file Malloc_T.h.  | 
  
      
  | 
  ||||||||||
| 
 Note that pool_name should be located in a directory with the appropriate visibility and protection so that all processes that need to access it can do so. Definition at line 296 of file Malloc_T.cpp. References ACE_TEXT_CHAR_TO_TCHAR, and ACE_TRACE. 
 00297 : allocator_ (ACE_TEXT_CHAR_TO_TCHAR (pool_name)) 00298 { 00299 ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); 00300 }  | 
  
      
  | 
  ||||||||||||||||||||
| 
 Note that pool_name should be located in a directory with the appropriate visibility and protection so that all processes that need to access it can do so. This constructor must be inline to avoid bugs with some C++ compilers. Definition at line 238 of file Malloc_T.h. 
 00241 : allocator_ (ACE_TEXT_CHAR_TO_TCHAR (pool_name), 00242 ACE_TEXT_CHAR_TO_TCHAR (lock_name), 00243 options) 00244 { 00245 ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); 00246 }  | 
  
      
  | 
  ||||||||||
| 
 Note that pool_name should be located in a directory with the appropriate visibility and protection so that all processes that need to access it can do so. Definition at line 304 of file Malloc_T.cpp. References ACE_TEXT_WCHAR_TO_TCHAR, and ACE_TRACE. 
 00305 : allocator_ (ACE_TEXT_WCHAR_TO_TCHAR (pool_name)) 00306 { 00307 ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); 00308 }  | 
  
      
  | 
  ||||||||||||||||||||
| 
 Note that pool_name should be located in a directory with the appropriate visibility and protection so that all processes that need to access it can do so. This constructor must be inline to avoid bugs with some C++ compilers. Definition at line 261 of file Malloc_T.h. 
 00264 : allocator_ (ACE_TEXT_WCHAR_TO_TCHAR (pool_name), 00265 ACE_TEXT_WCHAR_TO_TCHAR (lock_name), 00266 options) 00267 { 00268 ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::ACE_Allocator_Adapter"); 00269 }  | 
  
      
  | 
  ||||||||||
| 
 Destructor. 
 Definition at line 312 of file Malloc_T.cpp. References ACE_TRACE. 
 00313 {
00314   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::~ACE_Allocator_Adapter");
00315 }
 | 
  
      
  | 
  ||||||||||
| 
 Returns the underlying allocator. 
 Definition at line 201 of file Malloc_T.cpp. References ACE_TRACE. Referenced by ACE_Local_Name_Space<, ACE_LOCK >::remap(). 
 00202 {
00203   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::allocator");
00204   return this->allocator_;
00205 }
 | 
  
      
  | 
  ||||||||||||||||||||
| 
 Associate name with pointer. If duplicates == 0 then do not allow duplicate name/pointer associations, else if duplicates> != 0 then allow duplicate name/pointer assocations. Returns 0 if successfully binds (1) a previously unbound name or (2) duplicates != 0, returns 1 if trying to bind a previously bound name and duplicates == 0, else returns -1 if a resource failure occurs. Implements ACE_Allocator. Definition at line 230 of file Malloc_T.cpp. References ACE_TRACE. Referenced by ACE_Local_Name_Space<, ACE_LOCK >::create_manager_i(). 
 00233 {
00234   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::bind");
00235   return this->allocator_.bind (name, pointer, duplicates);
00236 }
 | 
  
      
  | 
  ||||||||||||||||||||
| 
 Allocate n_elem each of size elem_size, giving them initial_value. Definition at line 192 of file Malloc_T.cpp. References ACE_TRACE. 
 00195 {
00196   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::calloc");
00197   return this->allocator_.calloc (n_elem, elem_size, initial_value);
00198 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 Allocate nbytes, giving them all an initial_value. 
 Definition at line 184 of file Malloc_T.cpp. References ACE_TRACE. 
 00186 {
00187   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::calloc");
00188   return this->allocator_.calloc (nbytes, initial_value);
00189 }
 | 
  
      
  | 
  ||||||||||
| 
 Dump the state of the object. 
 Implements ACE_Allocator. Definition at line 327 of file Malloc_T.cpp. References ACE_TRACE. 
 00328 {
00329 #if defined (ACE_HAS_DUMP)
00330   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::dump");
00331   this->allocator_.dump ();
00332 #endif /* ACE_HAS_DUMP */
00333 }
 | 
  
      
  | 
  ||||||||||
| 
 Returns 0 if the name is in the mapping and -1 if not. 
 Implements ACE_Allocator. Definition at line 247 of file Malloc_T.cpp. References ACE_TRACE. 
 00248 {
00249   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::find");
00250   return this->allocator_.find (name);
00251 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 Locate name and pass out parameter via pointer. If found, return 0, returns -1 if name isn't found. Implements ACE_Allocator. Definition at line 239 of file Malloc_T.cpp. References ACE_TRACE. Referenced by ACE_Local_Name_Space<, ACE_LOCK >::create_manager_i(). 
 00241 {
00242   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::find");
00243   return this->allocator_.find (name, pointer);
00244 }
 | 
  
      
  | 
  ||||||||||
| 
 Free ptr (must have been allocated by ACE_Allocator::malloc()). 
 Implements ACE_Allocator. Definition at line 208 of file Malloc_T.cpp. References ACE_TRACE. Referenced by ACE_Local_Name_Space<, ACE_LOCK >::shared_bind_i(), and ACE_Local_Name_Space<, ACE_LOCK >::unbind_i(). 
 00209 {
00210   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::free");
00211   this->allocator_.free (ptr);
00212 }
 | 
  
      
  | 
  ||||||||||
| 
 Allocate nbytes, but don't give them any initial value. 
 Definition at line 177 of file Malloc_T.cpp. References ACE_TRACE. Referenced by ACE_Local_Name_Space<, ACE_LOCK >::create_manager_i(), and ACE_Local_Name_Space<, ACE_LOCK >::shared_bind_i(). 
 00178 {
00179   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::malloc");
00180   return this->allocator_.malloc (nbytes);
00181 }
 | 
  
      
  | 
  ||||||||||||||||||||
| 
 Change the protection of the pages of the mapped region to prot starting at addr up to len bytes. Definition at line 289 of file Malloc_T.cpp. References ACE_TRACE. 
 00290 {
00291   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::protect");
00292   return this->allocator_.protect (addr, len, flags);
00293 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 
Change the protection of the pages of the mapped region to prot starting at  Implements ACE_Allocator. Definition at line 282 of file Malloc_T.cpp. References ACE_TRACE, and ssize_t. 
 00283 {
00284   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::protect");
00285   return this->allocator_.protect (len, flags);
00286 }
 | 
  
      
  | 
  ||||||||||
| 
 Remove any resources associated with this memory manager. 
 Implements ACE_Allocator. Definition at line 215 of file Malloc_T.cpp. References ACE_TRACE. 
 00216 {
00217   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::remove");
00218   return this->allocator_.remove ();
00219 }
 | 
  
      
  | 
  ||||||||||||||||||||
| 
 
Sync len bytes of the memory region to the backing store starting at  Definition at line 275 of file Malloc_T.cpp. References ACE_TRACE. 
 00276 {
00277   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::sync");
00278   return this->allocator_.sync (addr, len, flags);
00279 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 
Sync len bytes of the memory region to the backing store starting at  Implements ACE_Allocator. Definition at line 268 of file Malloc_T.cpp. References ACE_TRACE, and ssize_t. Referenced by ACE_Local_Name_Space<, ACE_LOCK >::shared_bind_i(). 
 00269 {
00270   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::sync");
00271   return this->allocator_.sync (len, flags);
00272 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 Associate name with pointer. Does not allow duplicate name/pointer associations. Returns 0 if successfully binds (1) a previously unbound name, 1 if trying to bind a previously bound name, or returns -1 if a resource failure occurs. When this call returns, pointer's value will always reference the void * that name is associated with. Thus, if the caller needs to use pointer (e.g., to free it) a copy must be maintained by the caller. Implements ACE_Allocator. Definition at line 222 of file Malloc_T.cpp. References ACE_TRACE. 
 00224 {
00225   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::trybind");
00226   return this->allocator_.trybind (name, pointer);
00227 }
 | 
  
      
  | 
  ||||||||||||||||
| 
 Break any association of name. Returns the value of pointer in case the caller needs to deallocate memory. Implements ACE_Allocator. Definition at line 254 of file Malloc_T.cpp. References ACE_TRACE. 
 00255 {
00256   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::unbind");
00257   return this->allocator_.unbind (name, pointer);
00258 }
 | 
  
      
  | 
  ||||||||||
| 
 Unbind (remove) the name from the map. Don't return the pointer to the caller Implements ACE_Allocator. Definition at line 261 of file Malloc_T.cpp. References ACE_TRACE. 
 00262 {
00263   ACE_TRACE ("ACE_Allocator_Adapter<MALLOC>::unbind");
00264   return this->allocator_.unbind (name);
00265 }
 | 
  
      
  | 
  |||||
| 
 ALLOCATOR instance, which is owned by the adapter. 
 Reimplemented from ACE_Allocator. Definition at line 372 of file Malloc_T.h.  | 
  
 
1.3.6