can only allocate ~404 GB on a 512 GB machine ?
Martin Vogt
martin.vogt@itwm.fraunhofer.de
Thu Mar 4 14:37:00 GMT 2010
Martin Vogt wrote:
> Hello list,
>
> I have here a small machine with 512GB RAM and it seems
> to me that I hit some boundary when I allocate eg: 450GB.
>
> This is my example program:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <stdint.h>
>
> int main(int argn, char** argc) {
> long meg=1024*1024;
> long gig=meg*1024;
> long size=gig*403;
> char* dest;
>
> printf("size:%ld \n",size);
> printf("size2:%ld \n",SIZE_MAX);
> dest=malloc(size);
> printf("doing memset:%p\n",dest);
> memset(dest,0,size);
> }
>
>
> I can allocate 400GB, but not 405GB and its somehow related to the
> SIZE_MAX definition.
>
> I dont know if its a kernel boundary or a glibc boundary.
> (kernel is 2.6.33.5, glibc: 2.9-13.2 on opensuse 11.1)
>
> Is there a way to increase this?
>
Hello,
I just checked OpenSuSE 11.2 Live CD.
The precompiled binary can allocate 450 GB.
OpenSuSE 11.2 comes with glibc 2.10.
Is there a workaround to get the same on glibc 2.9?
(I'm assuming now its glibc, not the kernel)
regards,
Martin
More information about the Libc-help
mailing list