[futurebasic] Re: [FB] Array Setting via SIZE Resource/Free Memory?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 1999 : Group Archive : Group : All Groups

From: MacMuse@...
Date: Sat, 20 Mar 1999 22:13:52 EST
In a message dated 3/20/99 2:09:19 PM, t88@... writes:

<< I have a 3D program I am writing whereby I set up some global arrays using
Records in the globals declaration area.

I can set it to some arbitrarily high number to account for most modeling
uses, but if it runs out, then my users (and me) will be stuck. "Yo,
Author, I meed a recompile for 5,000 more points..." Not the way to go
obviously. :)

How can I set my record arrays to reflect a (higher) user set memory
allocation from the Finder's Get Info window?

Guess I am saying how can I know how large I can set my arrays to via the
SIZE resource set for the application at startup time (or the application's
current free memory) within global declarations.

That possible?

Other perhaps useless or moot thing: Is there any way to dynamically
allocate extra array elements from free system memory if I butted up to the
end of the program's assigned memory space ? (temporary memory use) Or
would that not be possible using a global array or global array in record
format? >>

The technique you need is clearly described in an article entitled "Using
Dynamically Allocated Memory" by Jon Birck in Vol 4, No. 12 of Inside Basic.
Quote: "Rather than use arrays, it may be to your advantage to use records
that store handles to large, dynamically allocated memory blocks."

I believe issues of Inside Basic are available online??? Does someone know
where?

Roger M. Clary
MacMUSE Software
MacMuse@...
http://members.aol.com/macmuse