[M3commit] CVS Update: cm3
Jay Krell
jkrell at elego.de
Tue Dec 15 00:09:45 CET 2009
CVSROOT: /usr/cvs
Changes by: jkrell at birch. 09/12/15 00:09:45
Modified files:
cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThread.m3
Log message:
fix leak in InitMutex if RegisterFinalCleanup runs out of memory.
Note that this requires locking heap while initLock held,
which is hopefully ok.
We can't store back the mutex and have it be used until we
are sure we'll be able to clean it up.
(Which also means we can't share the provided Clean function)
It would help if RegisterFinalCleanup provided some
sort of two phase operation where the space could
be reserved first and then the values either
filled in later or the space given up.
That way we could probably unnest the locks.
Consider that shortly.
It seems difficult though esp. to provide "space given up"
unless maybe that is considered rare and the space
just wasted for that case (at least if it is no longer
the last entry in the array).
More information about the M3commit
mailing list