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
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);
//
2 matches
Mail list logo