Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: More toolchain issues



Michael van Elst wrote:

> On Sun, Sep 27, 2009 at 06:44:08PM +0000, John Klos wrote:
>>>> There seems to be a big stability problem with port-amiga since
>>>> switching to jemalloc. I'm not sure what to do about it.
>>> 
>>> Is there a way to reproduce the problem?
>> 
>> One easily reproducable symptom is that you can't allocate more than 64
>> megs per process on an unlimited system (datasize 131072 kbytes).
> 
> Yes, I can reproduce this. malloc() returns a pointer but
> accessing the first byte of the allocated area already
> results in a segfault.

Ok. So the problem can easily be reproduced with the following small source:

#include <stdio.h>
#include <stdlib.h>
#define MBYTE (1024*1024)
int main()
{
  int i,m;
  unsigned char *p;
  for (m=1;;m++) {
    p = malloc(MBYTE);
    printf("%d MB\n",m);
    for (i=0; i<MBYTE; i++,*p++=0x55);
  }
  return 0;
}


For me it segfaults after having allocated 62MB. My datasize.soft and .hard
limit is 128MB.

-- 
Frank Wille



Home | Main Index | Thread Index | Old Index