This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]