🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #8990

Free memory available

#8990
From: Glenn M. Lewis
Date: Sun, 29 May 1988 05:49
29 lines
1489 bytes
[]

	What is the "acceptable" way to find out how much memory there is
in the system from a C program (without AllocMem'ing until a failure)?
	I want to make a command that takes one argument, a memory size,
and compares it to the amount of free memory available, and if there is more
than the argument, it will return a "true" error code, so that I can test
it with the AmigaDOS command "IF".  (What is a boolean "true" error code
in AmigaDOS, by the way?)
	Then, I can say in my startup sequence:

IF FreeMemory 1Meg THEN
	Do_something_that_takes_a_lot_of_RAM
	Like_load_my_entire_SYS_disk_into_RAM
	or_Startup_TeX_-R_and_the_previewer
ELSE
	Just_open_one_window_with_an_editor
ENDIF

	Thanks.
							-- Glenn

P.S.  The reason I want to do this, for you that have been following my
      situation, is that I can't get 1.2 to work reliably in my ASDG 2M
      expansion RAM, even though it passes every RAM test I have found.
      I have been getting a lot of Layers Library (#03) Gurus lately, too.

-- 
glewis@cit-vax.caltech.edu
Technical Details
Message-ID: <6743@cit-vax.Caltech.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!oberon!cit-vax!glewis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!oberon!cit-vax!glewis
From: glewis@cit-vax.Caltech.Edu (Glenn M. Lewis)
Newsgroups: comp.sys.amiga.tech
Subject: Free memory available
Message-ID: <6743@cit-vax.Caltech.Edu>
Date: 29 May 88 05:49:38 GMT
Reply-To: glewis@cit-vax.UUCP (Glenn M. Lewis)
Distribution: na
Organization: California Institute of Technology
Lines: 29