🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #25830

Bug in OSS Pascal memavail function

#25830
From: terrell
Date: Sat, 21 Mar 1987 18:43
20 lines
1361 bytes

There's an interesting problem with the OSS Pascal memavail function.

The value returned by this function does not increase after the dispose
procedure has returned some memory to the dynamic heap.  The value
only changes (decreases) following a call to the new procedure, or when
the os allocates some memory.

When I first noticed this, I assumed that dispose simply didn't return
memory to the heap.  In fact it does, but the value returned by memavail
does not reflect this.

To ascertain that dispose does in fact return memory to the heap, I wrote
a test program that repeatedly allocates and frees memory.  It worked fine.

The solution to this problem is, I suppose, to keep track of available
memory manually when using the dynamic heap.

Terrell
Technical Details
Message-ID: <8703211843.AA08251@ohio-state.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ames!ucbcad!ucbvax!OHIO-STATE.ARPA!terrell

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ames!ucbcad!ucbvax!OHIO-STATE.ARPA!terrell
From: terrell@OHIO-STATE.ARPA.UUCP
Newsgroups: comp.sys.atari.st
Subject: Bug in OSS Pascal memavail function
Message-ID: <8703211843.AA08251@ohio-state.ARPA>
Date: Sat, 21-Mar-87 13:43:28 EST
Article-I.D.: ohio-sta.8703211843.AA08251
Posted: Sat Mar 21 13:43:28 1987
Date-Received: Sun, 22-Mar-87 19:49:08 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 20