Martin Osterloh
2013-01-02 22:29:59 UTC
Hi all,
I have a working newlib port for my x86_64 OS. I can do malloc() without
any problems if the size of the memory I request is less than ~3500. I
have enough memory available - far more than 3500.
I am just wondering if anyone of you guys had a hint? My sbrk
implementation is the one that gets shipped with newib:
char * sbrk(int nbytes);
{
char *base;
if (!heap_ptr)
heap_ptr = (char *)&_end;
base = heap_ptr;
heap_ptr += nbytes;
return base;
}
My page size is 4096. One thought that comes to my mind is that I reach
the end of a page and I fail to allocate a new page?
I am keen to hear your opinions.
Thanks,
--Martin
I have a working newlib port for my x86_64 OS. I can do malloc() without
any problems if the size of the memory I request is less than ~3500. I
have enough memory available - far more than 3500.
I am just wondering if anyone of you guys had a hint? My sbrk
implementation is the one that gets shipped with newib:
char * sbrk(int nbytes);
{
char *base;
if (!heap_ptr)
heap_ptr = (char *)&_end;
base = heap_ptr;
heap_ptr += nbytes;
return base;
}
My page size is 4096. One thought that comes to my mind is that I reach
the end of a page and I fail to allocate a new page?
I am keen to hear your opinions.
Thanks,
--Martin