Respondida Heap Space

  • Sunday, May 08, 2005 10:33 PM
     
     
    I want to do some thing like this
    r1 = new BYTE[64000];
    r2 = new BYTE[64000];

    My first statement works fine, r1!=NULL, but r2==0. I think this has to do with my heap size, can anyone tell hoy can I enlarge my Heap Space (available memory for my program)

All Replies

  • Monday, May 09, 2005 10:58 AM
    Moderator
     
     Answered
    There is no command to enlarge the heap. It will grow when you request more memory.

    Give us more details. I just wrote a mini app in VS.NET 2003:

    int main()
    {
       BYTE *r1, *r2;
       r1 =
    new BYTE[64000];
       _ASSERT(r1!=NULL);
       r
    2 =
    new BYTE[64000];
       _ASSERT(r2!=NULL);
       return 0;
    }

    Works without a problem.