[Mono-devel-list] Zero Length Arrays

Piers Haken piersh at friskit.com
Sun Jan 11 20:34:35 EST 2004


What about locking? 

> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com 
> [mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of 
> Ben Maurer
> Sent: Sunday, January 11, 2004 10:47 AM
> To: A Rafael D Teixeira
> Cc: Mono Development
> Subject: RE: [Mono-devel-list] Zero Length Arrays
> 
> On Sun, 2004-01-11 at 12:59, A Rafael D Teixeira wrote:
> > >From: Ben Maurer <bmaurer at users.sourceforge.net>
> > >
> > >So, today, I realized that there is a VERY simple solution. In 
> > >mono_array_new, if it finds that it will be creating a zero length 
> > >array, it should used a cached zero length array.
> > 
> > But how will we deal with commonly used typed arrays? Will 
> we have to 
> > cache a per-type zero-length array, or is it possible to reuse a 
> > object-typed zero-length array?
> 
> One must be created per type. But we could lazy alloc.
> 
> -- Ben
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list