diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-02-23 18:27:18 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-02-23 18:27:18 +0000 |
commit | e58ec666585e4c18a4149386468477663dd651d0 (patch) | |
tree | a597c869bb357c6da634defb98a51292a8748cf6 | |
parent | 998d8e2db900944c0239622e0f4ffeab35eac00d (diff) | |
download | ATCD-e58ec666585e4c18a4149386468477663dd651d0.tar.gz |
ChangeLogTag:Mon Feb 23 12:25:21 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-98c | 9 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp | 12 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i | 12 |
4 files changed, 24 insertions, 15 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 675f465fe58..28d6110bda4 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,12 @@ +Mon Feb 23 12:25:21 1998 Carlos O'Ryan <coryan@cs.wustl.edu> + + * orbsvcs/orbsvcs/Event/Memory_Pools.h: + * orbsvcs/orbsvcs/Event/Memory_Pools.i: + * orbsvcs/orbsvcs/Event/Memory_Pools.cpp: + We cannot use TSS memory pools: in some cases the memory is + allocated in one thread and disposed in another. Until we can + clean out that behavior I'm using a singleton. + Mon Feb 23 11:57:16 1998 Alexander Babu Arulanthu <alex@merengue.cs.wustl.edu> * orbsvcs/orbsvcs/Property/ : Changed the names EXT_ID and INT_ID diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp index af823c90fc5..7d3d00a2507 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.cpp @@ -7,9 +7,9 @@ #include "Memory_Pools.i" #endif /* __ACE_INLINE__ */ -ACE_TSS<ACE_ES_Dispatch_Request_Allocator> ACE_ES_Memory_Pools::Dispatch_Request_; -ACE_TSS<ACE_ES_Event_Container_Allocator> ACE_ES_Memory_Pools::Event_Container_; -ACE_TSS<ACE_ES_Event_Allocator> ACE_ES_Memory_Pools::Event_; +//ACE_TSS<ACE_ES_Dispatch_Request_Allocator> ACE_ES_Memory_Pools::Dispatch_Request_; +//ACE_TSS<ACE_ES_Event_Container_Allocator> ACE_ES_Memory_Pools::Event_Container_; +//ACE_TSS<ACE_ES_Event_Allocator> ACE_ES_Memory_Pools::Event_; // ************************************************************ @@ -17,9 +17,9 @@ int ACE_ES_Memory_Pools::thr_init (void) { // Allocate the memory pool for this thread. - Event_Container_.ts_object (); - Dispatch_Request_.ts_object (); - Event_.ts_object (); + //Event_Container_.ts_object (); + //Dispatch_Request_.ts_object (); + //Event_.ts_object (); return 0; } diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h index 92e8ef24d5a..2fc86d5f33c 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h +++ b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h @@ -93,9 +93,9 @@ public: static void *new_Event (size_t); static void delete_Event (void *); - static ACE_TSS<ACE_ES_Dispatch_Request_Allocator> Dispatch_Request_; - static ACE_TSS<ACE_ES_Event_Container_Allocator> Event_Container_; - static ACE_TSS<ACE_ES_Event_Allocator> Event_; + typedef ACE_Singleton<ACE_ES_Dispatch_Request_Allocator,ACE_Null_Mutex> Dispatch_Request_; + typedef ACE_Singleton<ACE_ES_Event_Container_Allocator,ACE_Null_Mutex> Event_Container_; + typedef ACE_Singleton<ACE_ES_Event_Allocator,ACE_Null_Mutex> Event_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i index 3f6e3b26223..f2d73d94ed3 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i +++ b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.i @@ -4,25 +4,25 @@ ACE_INLINE void * ACE_ES_Memory_Pools::new_Event_Container (void) { - return Event_Container_->malloc (sizeof (ACE_ES_Event_Container)); + return Event_Container_::instance ()->malloc (sizeof (ACE_ES_Event_Container)); } ACE_INLINE void ACE_ES_Memory_Pools::delete_Event_Container (void *mem) { - Event_Container_->free (mem); + Event_Container_::instance ()->free (mem); } ACE_INLINE void * ACE_ES_Memory_Pools::new_Dispatch_Request (void) { - return Dispatch_Request_->malloc (sizeof (ACE_ES_Dispatch_Request)); + return Dispatch_Request_::instance ()->malloc (sizeof (ACE_ES_Dispatch_Request)); } ACE_INLINE void ACE_ES_Memory_Pools::delete_Dispatch_Request (void *mem) { - Dispatch_Request_->free (mem); + Dispatch_Request_::instance ()->free (mem); } #define USE_MEM_POOLS 1 @@ -35,7 +35,7 @@ ACE_ES_Memory_Pools::new_Event (size_t len) const u_int size = (ev_size % ACE_MALLOC_ALIGN) ? ((ev_size / ACE_MALLOC_ALIGN) + 1) * ACE_MALLOC_ALIGN : ev_size; - char *const addr = (char *) Event_->malloc (len * size); + char *const addr = (char *) Event_::instance ()->malloc (len * size); #else char *const addr = new char[len * sizeof (ACE_ES_Event)]; #endif @@ -47,7 +47,7 @@ ACE_INLINE void ACE_ES_Memory_Pools::delete_Event (void *mem) { #if USE_MEM_POOLS - Event_->free (mem); + Event_::instance ()->free (mem); #else delete [] mem; #endif |