OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <ZeroCopyAllocator_T.h>
Public Member Functions | |
FirstTimeFastAllocator () | |
virtual void * | malloc (size_t nbytes) |
virtual void | free (void *ptr) |
virtual void * | calloc (size_t nbytes, char initial_value='\0') |
These methods are no-ops. More... | |
virtual void * | calloc (size_t n_elem, size_t elem_size, char initial_value='\0') |
virtual int | remove () |
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) |
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) |
virtual void | dump () const |
T * | pool () |
![]() | |
ACE_Allocator (void) | |
virtual | ~ACE_Allocator (void) |
Private Attributes | |
bool | firstTime_ |
is this the first time this is allocated? More... | |
T | pool_ [N] |
the pool of allocated memory. More... | |
Additional Inherited Members | |
![]() | |
typedef size_t | size_type |
![]() | |
static ACE_Allocator * | instance (void) |
static ACE_Allocator * | instance (ACE_Allocator *) |
static void | close_singleton (void) |
This allocator is "Fast" because it's pool can be on the stack (If the object is on the stack and hence it does not require the cost of allocating and deallocating on the heap. It object is on the heap then it requires just one allocation; not two.) WARNING The object using this allocator must not have a scope smaller than this object !!!
Definition at line 32 of file ZeroCopyAllocator_T.h.
ACE_INLINE OpenDDS::DCPS::FirstTimeFastAllocator< T, N >::FirstTimeFastAllocator | ( | ) |
Definition at line 19 of file ZeroCopyAllocator_T.inl.
|
virtual |
Implements ACE_Allocator.
Definition at line 59 of file ZeroCopyAllocator_T.cpp.
|
virtual |
These methods are no-ops.
Implements ACE_Allocator.
Definition at line 31 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 40 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 181 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 82 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 93 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 47 of file ZeroCopyAllocator_T.inl.
|
virtual |
Implements ACE_Allocator.
Definition at line 30 of file ZeroCopyAllocator_T.inl.
|
inline |
Definition at line 57 of file ZeroCopyAllocator_T.h.
Referenced by TAO::DCPS::ZeroCopyDataSeq< Sample_T, DEF_MAX >::swap().
|
virtual |
Implements ACE_Allocator.
Definition at line 147 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 158 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 50 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 124 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 135 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 71 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 103 of file ZeroCopyAllocator_T.cpp.
|
virtual |
Implements ACE_Allocator.
Definition at line 113 of file ZeroCopyAllocator_T.cpp.
|
private |
is this the first time this is allocated?
Definition at line 63 of file ZeroCopyAllocator_T.h.
|
private |
the pool of allocated memory.
Definition at line 66 of file ZeroCopyAllocator_T.h.
Referenced by OpenDDS::DCPS::FirstTimeFastAllocator< OpenDDS::DCPS::ReceivedDataElement *, DEF_MAX >::pool().