Re: malloc function

From: Renison, Rick (rick.renison@EDS.COM)
Date: Fri Mar 28 2003 - 13:27:39 EST


see
http://publib.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/lrg
_prg_support.htm#A179C11c5d for an explanation of large program support in
AIX.

...Rick

> -----Original Message-----
> From: Nguyen, Joseph [mailto:JNguyen@WM.COM]
> Sent: March 28, 2003 11:46 AM
> To: aix-l@Princeton.EDU
> Subject: malloc function
>
>
> 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