Board index » delphi » Heap Overflow Error (Urgent Help needed)

Heap Overflow Error (Urgent Help needed)

Hello

       I am using Turbo Pascal 7.0.  I am getting a "Heap Overflow
error" problem.  How can I solve it?  What causes that error?

Thank You

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:Heap Overflow Error (Urgent Help needed)


In article <7dgh3u$40...@nnrp1.dejanews.com>,

Quote
  charl...@cwdom.dm wrote:
> Hello

>        I am using Turbo Pascal 7.0.  I am getting a "Heap Overflow
> error" problem.  How can I solve it?  What causes that error?

Ever considered reading Borlands excellent manuals?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:Heap Overflow Error (Urgent Help needed)


you just ran out of heap memory.. to solve this.. you must cut in your
memory allocations (new ,getmem procedure's) ... or upgrade to Borland
Pascal 7.0 ,which supports DPMI ,which allows you to use all of your system
memory... (for some guys: YES you can use more than 16mb... the 16 mb only
is valid at 286's since it is a processor limitation rather than a Borland
Pascal limitation)...
Quote
<charl...@cwdom.dm> wrote in message news:7dgh3u$40d$1@nnrp1.dejanews.com...
>Hello

>       I am using Turbo Pascal 7.0.  I am getting a "Heap Overflow
>error" problem.  How can I solve it?  What causes that error?

>Thank You

>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

Re:Heap Overflow Error (Urgent Help needed)


In article <922476435.17825.0.muttley.d4ee1...@news.demon.nl>,

Quote
The NightmarE <Nightm...@santi.demon.nl> wrote:
>you just ran out of heap memory.. to solve this.. you must cut in your
>memory allocations (new ,getmem procedure's) ... or upgrade to Borland
>Pascal 7.0 ,which supports DPMI ,which allows you to use all of your system
>memory... (for some guys: YES you can use more than 16mb... the 16 mb only
>is valid at 286's since it is a processor limitation rather than a Borland
>Pascal limitation)...

Also one should check each allocation either with maxavail (does not
work in BP 7.0 DPMI) or by installing a heap error handler that returns
nil when there is no memory. In that case one MUST check the pointer
before using it.

Osmo

Re:Heap Overflow Error (Urgent Help needed)


Quote
>Also one should check each allocation either with maxavail (does not
>work in BP 7.0 DPMI) or by installing a heap error handler that returns
>nil when there is no memory. In that case one MUST check the pointer
>before using it.

>Osmo

How does one install a heap error handler?  Is it something you write
yourself, or is it provided somewhere already?

Nikita.

Re:Heap Overflow Error (Urgent Help needed)


JRS:  In article <lbhL2.6011$8c4.29871...@news.magma.ca> of Sun, 28 Mar
1999 03:17:37 in news:comp.lang.pascal.borland, Nikita Synytskyy

Quote
<nik...@NOSPAMmondenet.com> wrote:

>How does one install a heap error handler?  Is it something you write
>yourself, or is it provided somewhere already?

That information is TOP SECRET, which is why it is concealed in the
manuals and online help with an index entry of HeapError.

Perhaps TSFAQP#74 might have a mere reference to the above added?

--
 ? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
  Web <URL: http://www.merlyn.demon.co.uk/> - TP/BP/&c. FAQqish topics & links.
  Timo's TurboPascal <A HREF="ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip">FAQ</A>.
  <A HREF="http://www.merlyn.demon.co.uk/clpb-faq.txt">Mini-FAQ</A> of c.l.p.b.

Re:Heap Overflow Error (Urgent Help needed)


In article <lbhL2.6011$8c4.29871...@news.magma.ca>,

Quote
Nikita Synytskyy <nik...@NOSPAMmondenet.com> wrote:

>>Also one should check each allocation either with maxavail (does not
>>work in BP 7.0 DPMI) or by installing a heap error handler that returns
>>nil when there is no memory. In that case one MUST check the pointer
>>before using it.

>>Osmo

>How does one install a heap error handler?  Is it something you write
>yourself, or is it provided somewhere already?

It is explained in the manual, but basically one writes:

Function HeapFunc(x:word):integer; far;
begin
  heapfunc:=1;
End;

...

Heaperror:=@heapfunc;

Now I may recall the types, or the return value incorrectly.

Osmo

Other Threads