[Mono-devel-list] Typed allocation facility in runtime

Martin Baulig martin at gnome.org
Fri Apr 4 09:16:32 EST 2003


Varga Zoltan <vargaz at freemail.hu> writes:

>   I added an experimental typed allocation facility to the
> runtime. Typed
> allocation means the Boehm collector knows the layout of
> heap allocated
> objects and known which words can hold pointers and which do
> not. This
> speeds up collection since fewer memory locations needs to
> be examined,
> and it also decreases the working set of applications since
> fewer false
> pointers are encountered by the collector. Typed allocation
> can be turned
> on by setting CREATION_SPEEDUP to 1 in metadata/object.c. 
> This change speeds up corlib compilation by about 10% on my
> machine.
> I would appreciate if people would test this. If it works,
> it can be made
> the default.

Hi,

I haven't looked at the code yet, but I'd like to use something similar for the debugger's
MemoryStream implementation since it allocates very large objects which can not contain
any pointers (the contents of the symbol file).  Is it possible to call this from managed
code somehow to tell the garbage collector to allocate an object of XXX bytes which cannot
contain any pointers ?

Btw. my libgc changes will also increase corlib compilation speed since we don't need to
suspend/resume any threads anymore.

-- 
Martin Baulig
martin at gnome.org
martin at ximian.com



More information about the Mono-devel-list mailing list