[gs-bugs] [Bug 691720] incorrect memory-counting in gsmchunk

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Mon Jan 3 20:28:28 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=691720

Ray Johnston <ray.johnston at artifex.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Ray Johnston <ray.johnston at artifex.com> 2011-01-03 20:28:14 UTC ---
Thanks, Norbert. I committed the fix for the increment of 'used'.

I did _not_ make the change to "align" the elements of the two different
memory structures since casting one to the other is too likely to cause
problems if one or the other of the structures is changed in the future,
and we would not like to constrain the definition of these.

I believe I addressed the issues with the thread safety of the chunk allocator,
specifically, the allocator is NOT thread safe by itself, but can be made
so by using a 'locking wrapper' allocator. Also the 'base' allocator of the
chunk allocator (or any allocator) MUST BE thread safe to be used as the
base allocator by more than one thread (as the multi-threaded rendering does).

ONLY the "heap allocator" (gsmalloc.c) is inherently thread safe since it
has a 'monitor' (mutex) for all operations that affect its internal structs.

Any further questions can be addressed by email to support.

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list