[omniORB] Using Compare and Swap for 2.8 and 3.0?

Chung, David David.Chung@USPTO.GOV
Tue, 14 Dec 1999 09:16:48 -0500


	In email archives, I saw several messages regarding one-time memory
allocation for synchronization objects that are never cleaned up (as they
are needed for orderly shutdown).  The objects manifests as memory leaks on
both omniORB 3.0 and 2.8

	Perhaps the thing to do here is not to leave this "feature" alone,
but to fix it using more "primitive" synchronization calls, such as compare
and swap (CAS) or Bit Test and Set (BTS).  Using these will eliminate the
need to create mutexe/semaphore objects that need to stay around.

	Unfortunately, CAS and BTS are not uniformly implemented on
different platforms, so to do this right, you will need to create proper
platform abstraction layer (or wrapper functions).  Some would argue that
implementing these are more trouble than they are worth; but then, the same
argument can be made for staying with all kludges, which tend to be good
only as short term solutions.