malloc function

From: Nguyen, Joseph (JNguyen@WM.COM)
Date: Fri Mar 28 2003 - 11:45:33 EST


I have the following program that error out if I change the value greater
than 257000000. It appears to be 256M limitation. How can I go beyond it?

This system run AIX 4.3.3 ML10 with version 5 C compiler.

#include <stdio.h>

int main (int argc, char *argv) {

        char *cArray;

        cArray = (char*) malloc (257000000 * sizeof (char));

        if (cArray == NULL) printf ("Failed to malloc space\n");
        else printf ("Succeeded in mallocing space\n");

        exit (0);
}



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:42 EDT