malloc more than 2 GB? - SGI

This is a discussion on malloc more than 2 GB? - SGI ; Sorry if this is a FAQ. Is it possible to malloc() more than 2 GB worth of memory in a single call? I see that malloc() accepts a size_t which is an int even on my 64-bit SGI. Thanks....

+ Reply to Thread
Results 1 to 3 of 3

Thread: malloc more than 2 GB?

  1. malloc more than 2 GB?

    Sorry if this is a FAQ. Is it possible to malloc() more
    than 2 GB worth of memory in a single call? I see that
    malloc() accepts a size_t which is an int even on my
    64-bit SGI. Thanks.

  2. Re: malloc more than 2 GB?

    On 1/31/2004 1:39 PM, r5 wrote:
    > Sorry if this is a FAQ. Is it possible to malloc() more
    > than 2 GB worth of memory in a single call? I see that
    > malloc() accepts a size_t which is an int even on my
    > 64-bit SGI. Thanks.


    It's is a FAQ - at least *try* Google to find the answer.

    If you compile with -64, then size_t is unsigned long, which will be
    8-bytes. There are other system parameters to adjust to allow a process
    to get > 2GB...Google is your friend!

  3. Re: malloc more than 2 GB?

    Michael Rice wrote:
    > On 1/31/2004 1:39 PM, r5 wrote:
    > It's is a FAQ - at least *try* Google to find the answer.


    Thanks, I had been searching there, and it is a mess. This
    topic is not easy to search for because the terms are too
    generic and appear too often all over the place.

    http://www.google.com/search?as_q=ma...num=100&hl=en&
    ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as
    _filetype=&as_qdr=all&as_occt=any&as_dt=i&as_sitesearch=&safe=off

    > 8-bytes. There are other system parameters to adjust to allow a process
    > to get > 2GB...Google is your friend!


    Yes, I took care of the other stuff to run large processes
    some time ago. Thanks again for the info.

+ Reply to Thread