[futurebasic] FB^3 Memory and Temp file questions

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2000 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Mon, 30 Oct 2000 04:53:13 -0400
Helpful people (I hope)

I have 2 things I would appreciate more info on if possible:

* Dynamic memory allocation for a GWorld for instance.

Say with a 32 Bit Gworld, 1600*800*4, would be like 5120000 bytes, right?
(5.1 MB)

If MEM(_maxAvail) or MEM(_freeBytes) indicate that only 2 MB are available
to the App, is there a way to check the available machine memory to see how
much extra is available there, and allocate a portion of that to the app so
that the GWorld can then be built?

For instance, above example, but machine and current apps, see somehow that
the largest unused block of RAM is 36 MB, then  grab 10 MB of that for
example? Otherwise, bail.

* Item 2

Anyone know how to find the Temporary Items folder, and  create and then
delete a file there? I am in the need of writing temporary PICT files, and
then deleting them when done. I want to be sure I am fine across OS
versions and international too (folder finding/using). Creating just
involves a Temp name and the vRefnum I imagine, and standard PICT write.

Thanks for any help here.

Robert Covington