[Mono-bugs] [Bug 58027][Wis] Changed - Get rid of synch block in MonoObject
Tue, 4 May 2004 23:27:54 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/58027 2004-05-04 15:12:04.000000000 -0400
+++ shadow/58027.tmp.9983 2004-05-04 23:27:54.000000000 -0400
@@ -1,23 +1,22 @@
Product: Mono: Runtime
-Summary: get rid of synch block in MonoObject
+Summary: Get rid of synch block in MonoObject
Currently, MonoObject contains a 4 byte sync block used for implementing
synchronization. Most of the time, this field is unused since most objects
are never locked. For example, mcs creates about 3000000 objects during a
corlib compilation. This means that 12 mb memory is used for just the sync
blocks. This is about 10% of the total memory usage of mcs. Besides taking
@@ -32,6 +31,11 @@
include Object (since the Net framework recommends using a newly
allocated Object for synchronization), and Type (since
static synchronized objects synchronize on the type). If an object
which does not have a sync block needs to be synchronized, it is done
using alternative (1). Types needing a sync block could also be
annotated with a custom attribute, like Mono.SynchronizationAttribute.
+------- Additional Comments From email@example.com 2004-05-04 23:27 -------
+Before, I tried doing this by solution (1). One major problem was that
+alot of code depends on the offset of the field after the sync block
+to be 0 mod 8.