Re: How to increase HEAP size in VC++ 6.0 environment

From: Perry S. Morris (relvinian_at_mindspring.com)
Date: 04/02/04


Date: Fri, 02 Apr 2004 15:28:59 GMT

Nikhil,

Look at the Win32 API calls VirtualAlloc() and VirtualFree(). Use these
instead of new/delete for large blocks of memory.

On a side note, this forum is suppose to be c++ only --- not OS dependent
or compiler dependent.

Anyway, I hope those two API calls will help you. ;-)

Perry

"nvjoglekar" <nvjoglekar@rediffmail.com> wrote in message
news:bcae6599.0404020713.61d032cf@posting.google.com...
> Hi All
>
> My program needs a lot of memory and after allocating some using NEW
> statement, it returns NULL for any new object created. I guess that is
> becuase of the heap size limitation of the Visual Studio which stands
> at 1MB. I need to increase it. One option I found was to set
> /HEAP:memory in the Link options of project setting. Bur it didn't
> seem to work. I am getting same problem again.
> Dows anybody has a opinion about this.
>
> regards
> Nikhil



Relevant Pages

  • Re: Fill Frame Buffer in Video Driver Initialization
    ... This doesn't make sense, there is only 512Mb of memory, giving an address limit of 0x20000000. ... It is interesting to see that the flat physical address is given by the BIOS and passed to the BootArgs: this means that you should be able to use the VGA Flat display driver just as it. ... However, in the MSDN documentation for VirtualAlloc, it says that memory allocated will be initialized to zero. ... 0xEE000000 is not a physical address, unless you have a dedicated frame buffer mapped at physical 0x6E000000, or it is a window in PCI space. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Fill Frame Buffer in Video Driver Initialization
    ... This doesn't make sense, there is only 512Mb of memory, giving an address ... It looks like the bootloader gets the buffer address here ... This is where I should use the VirtualAlloc in the video driver, ... the way it maps the frame buffer. ...
    (microsoft.public.windowsce.platbuilder)
  • RE: memory problem in PPC evb application..plz help.
    ... The main probelm was the adoce31.dll, this was taking lot of virtuall memory ... meanwhile I have tried erazing all my variant dynamic arrays.. ... > each frame representing a form. ... >> I know that VirtualAlloc API can be used for this. ...
    (microsoft.public.pocketpc.developer)
  • Re: Passing Data between an ISR and an IST
    ... the physical address that corresponds to your virtual memory address. ... > I have been trying to follow the instructions in the Windows CE> Product Documentation article "Passing Data between an ISR and an IST" ... Reserve physical memory for the ISR in your Config.bib file. ... > MMMapIoSpace calls the VirtualAlloc and VirtualCopy functions to map> the physical memory to a virtual-memory address that the IST can> access. ...
    (microsoft.public.windowsce.embedded)
  • Re: virtual memory question
    ... User Accessible Memory obtained with VirtualAlloc and/ot GlobalAlloc ... > The API hooks were the problem and not the WH_ message hooks. ...
    (microsoft.public.win32.programmer.kernel)

Loading