Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-30 Thread David Chisnall
On 28 Jun 2008, at 10:56, David Ayers wrote: Richard Frith-Macdonald schrieb: Author: rfm Date: Sat Jun 28 07:13:47 2008 New Revision: 26723 URL: http://svn.gna.org/viewcvs/gnustep?rev=26723view=rev Log: Try to ensure that ffi uses executable memory and doesn't segfault Ahh! Yes, mmap!

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-30 Thread David Chisnall
On 29 Jun 2008, at 10:38, Richard Frith-Macdonald wrote: On 29 Jun 2008, at 08:54, David Ayers wrote: Hello David David Chisnall schrieb: I think calling mmap directly is the wrong solution here. You should be using valloc() with the requested size rounded up to the nearest page I'm

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-30 Thread Richard Frith-Macdonald
On 30 Jun 2008, at 12:33, David Chisnall wrote: My man page for vmalloc states: The obsolete function valloc() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the page size. It is equivalent to

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-30 Thread David Chisnall
On 30 Jun 2008, at 15:00, Richard Frith-Macdonald wrote: On 30 Jun 2008, at 12:33, David Chisnall wrote: My man page for vmalloc states: The obsolete function valloc() allocates size bytes and returns a pointer to the allocated memory. The memory address will be a multiple of the

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-29 Thread David Ayers
Hello David David Chisnall schrieb: I think calling mmap directly is the wrong solution here. You should be using valloc() with the requested size rounded up to the nearest page size, and then use mprotect to set it as executable. Note that most sane operating systems (and Vista) are moving

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-29 Thread Richard Frith-Macdonald
On 29 Jun 2008, at 08:54, David Ayers wrote: Hello David David Chisnall schrieb: I think calling mmap directly is the wrong solution here. You should be using valloc() with the requested size rounded up to the nearest page I'm not sure what advantage valloc() has over mmap() ... all the

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-29 Thread Hubert Chathi
On Sun, 29 Jun 2008 09:54:56 +0200, David Ayers [EMAIL PROTECTED] said: Hello David David Chisnall schrieb: I think calling mmap directly is the wrong solution here. You should be using valloc() with the requested size rounded up to the nearest page size, and then use mprotect to set it as

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-29 Thread David Ayers
Hubert Chathi schrieb: On Sun, 29 Jun 2008 09:54:56 +0200, David Ayers [EMAIL PROTECTED] said: Hello David David Chisnall schrieb: I think calling mmap directly is the wrong solution here. You should be using valloc() with the requested size rounded up to the nearest page size, and then

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-29 Thread Hubert Chathi
On Sun, 29 Jun 2008 23:11:44 +0200, David Ayers [EMAIL PROTECTED] said: Hubert Chathi schrieb: Heh. My man page for memalign says: , | The obsolete function memalign() allocates size bytes and returns a | pointer to the allocated memory. The memory address will be a multiple | of

Re: [Gnustep-cvs] r26723 - in /libs/base/trunk: ChangeLog Headers/Additions/GNUstepBase/config.h.in Source/GSFFIInvocation.m configure configure.ac

2008-06-28 Thread David Ayers
Richard Frith-Macdonald schrieb: Author: rfm Date: Sat Jun 28 07:13:47 2008 New Revision: 26723 URL: http://svn.gna.org/viewcvs/gnustep?rev=26723view=rev Log: Try to ensure that ffi uses executable memory and doesn't segfault Ahh! Yes, mmap! Thank you! Cheers, David