Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!usc!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: LMI Forth(s) Message-ID: <1711.UUL1.3#5129@willett.pgh.pa.us> Date: 12 Sep 90 03:26:31 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 40 Date: 09-07-90 (08:55) Number: 765 (Echo) To: ALL Refer#: NONE From: RON TOLER Read: (N/A) Subj: MEMORY AVAIL TO MALLOC Status: PUBLIC MESSAGE I'm currently rewriting a memory allotment routine by using the MALLOC and REALLOC commands. Is there any method whereby I can determine the amount of free memory available to MALLOC without actually having to assign it to my program. I use this value as an indication of when it is neccessary to 'flush' memory of past used files that are at present resident but inactive. Ron Toler Visiontech 3160 W. Kearney Springfield MO 65803 (417) 862-8100 NET/Mail : LMI Forth Board, Los Angeles, CA (213) 306-3530 Date: 09-08-90 (23:01) Number: 766 (Echo) To: RON TOLER Refer#: 765 From: RAY DUNCAN Read: NO Subj: MEMORY AVAIL TO MALLOC Status: PUBLIC MESSAGE There isn't a straightforward way to do this. We want code that uses MALLOC to be portable across all our systems, and in some environments (such as OS/2) MALLOC won't fail until the system's virtual memory is exhausted. If you plan to run only under DOS, use the INT86 operator to call MS-DOS Int 21H Function 48H with BX=FFFFH; this will always fail, but upon return you'll see the number of paragraphs of actual memory available in register BX. NET/Mail : LMI Forth Board, Los Angeles, CA (213) 306-3530 ----- This message came from GEnie via willett through a semi-automated process. Report problems to: uunet!willett!dwp or dwp@willett.pgh.pa.us