Re: problems with mprotect()

2002-09-24 Thread Corinna Vinschen
On Mon, Sep 23, 2002 at 07:21:22PM -0700, Anonymous wrote: > Hi, I'm having segfaults with the following piece of code (working from > WinXP SP1 using latest Cygwin release): > > char * AllocBoundedArray(int size) > { > int pgSize = getpagesize(); > char *ptr = new char[pgSize * 2 + s

problems with mprotect()

2002-09-23 Thread Anonymous
Hi, I'm having segfaults with the following piece of code (working from WinXP SP1 using latest Cygwin release): char * AllocBoundedArray(int size) { int pgSize = getpagesize(); char *ptr = new char[pgSize * 2 + size]; // before mprotect(ptr, pgSize, 0); //