[Mono-dev] How To Convince Mono To Allocate Big Arrays

Luis F. Ortiz LuisOrtiz at verizon.net
Thu May 8 19:21:03 EDT 2008

On May 8, 2008, at 9:29 AM, Rodrigo Kumpera wrote:
> One important thing I forgot. If you break your patch into a few  
> smaller ones the review process will be a lot easier to every one  
> involved.
> The first one can introduce new types and configuration foo; then  
> other to fix codegen and Array methods and; at last, a bunch of  
> fixes to classlib issues -like sockets, file i/o and so on.
> Cheers,
> Rodrigo

OK, here is another stab at the changes.

This modifies the following files:

These files:
  1) Add a new configuration option, --enable-big-arrays, which  
defines conditionally defines MONO_BIG_ARRAYS in config.h,
  2) Add in mono/metadata/object.h :
   A) A new typedef for mono_array_size_t to be either guint32 or  
   B) A new #define for MONO_ARRAY_MAX_INDEX for the biggest valid  
array index, i.e. G_MAXINTxx
   C) A new #define for MONO_ARRAY_MAX_SIZE for the biggest valid  
array allocation, i.e. G_MAXUINTxx
   D) The above all controlled by MONO_BIG_ARRAYS
  3) Modify the definitions of mono_array_new(),  
mono_array_new_full(), and mono_array_new_specific() to match,
  4) Modify the usages of those functions in the metadata directory to  
  5) Add range checking in ves_icall_System_Array_CreateInstanceImpl64  
so it works with or without MONO_BIG_ARRAYS,
  6) Attempt to address all the mistakes you pointed out.

These changes, in addition to the other changes I made, pass "make  
check" with the exception of Tests.test_0_regress_75832(), as  
previously confessed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rodrigo1.patch
Type: application/octet-stream
Size: 13581 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080508/0bb19955/attachment.obj 
-------------- next part --------------


More information about the Mono-devel-list mailing list