This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
can only allocate ~404 GB on a 512 GB machine ?
- From: Martin Vogt <martin dot vogt at itwm dot fraunhofer dot de>
- To: libc-help at sourceware dot org
- Date: Thu, 04 Mar 2010 11:28:32 +0100
- Subject: can only allocate ~404 GB on a 512 GB machine ?
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?
regards,
Martin