[Mono-list] Adding Solaris/amd64 support

Paolo Molaro lupus at ximian.com
Wed Mar 7 15:29:15 EST 2007


On 03/07/07 Andreas Färber wrote:
> Solaris' sys/mman.h does define _MAP_LOW32 for that purpose - but  
> only conditionally if _KERNEL were defined. So not being able to use  
> the define directly inside #ifndef MAP_32BIT, I defined it to  
> _MAP_LOW32's value of 0x80 instead of the default of 0. This leads to  
> a segmentation fault and core dump at runtime prior to any of my  
> debug output (no "TYPE: 1" either).

Make the code print the address you got back, though it's possible that
your hack is invalid (the kernel value may not be the same as the
userspace one, if it indeed is allowed). In any case we'd need more info
about the segfault.

> Before we dig around too deep inside Mono, is there some command for  
> me to temporarily limit the available swap memory to check if it  
> actually works with <= 2GB available?

It's not an issue of swap, but of address space. I just checked and
you could try to add:
#define MONO_ARCH_NOMAP32BIT 1
to the top of mono/mini/mini-amd64.c or in mini-amd64.h.
This will make the code emit the slower call sequence and hopefully work
on solaris (try without the _MAP_LOW32 hack): it seems the same is done
on freebsd.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better


More information about the Mono-list mailing list