06-06-2012, 06:42 PM
slenkar Wrote:I dont see memavail or maxavail in the library directory in program files/boriel tm/zx basic compiler/library or in the wikithey are in the alloc.bas library.
Code:
#include <alloc.bas>
New game: Earthraid
|
06-06-2012, 06:42 PM
slenkar Wrote:I dont see memavail or maxavail in the library directory in program files/boriel tm/zx basic compiler/library or in the wikithey are in the alloc.bas library. Code: #include <alloc.bas>
06-06-2012, 06:50 PM
boriel Wrote:thanksslenkar Wrote:I dont see memavail or maxavail in the library directory in program files/boriel tm/zx basic compiler/library or in the wikithey are in the alloc.bas library. I ran a program to print memavail and it said 4764 does this mean 4764 bytes are available? Code: #Include <alloc.bas> I tried allocating some memory and got the same result: Code: #Include <alloc.bas>
06-06-2012, 09:22 PM
I don't think global variables are allocated on the heap.
06-06-2012, 10:20 PM
britlion Wrote:I don't think global variables are allocated on the heap.True. Global var are not allocated on the heap. They are "static". The code above is static and the heap is not affected. What slenkar wants it a Dynamic Array (not supported yet). Al DIM sentences are just declarations and reserve the memory in compile time, except for local variables (e.g. within a function), which are temporary allocated into the stack. DIM sentences are *not* executed. Sinclair BASIC does executes them. In the future, ZX BASIC will allow this to. So you can REDIM arrays on runtime. These are Dynamic Arrays and they will go into the heap.
06-06-2012, 10:22 PM
slenkar Wrote:I ran a program to print memavail and it said 4764 does this mean 4764 bytes are available?Yes, that's it. But memavail and maxavail are not the same (see freebasic help). Anyway, at the moment the heap is only used for string storage.
06-26-2012, 08:19 PM
Version 1.1 is finished and can be downloaded now.
Edit: Heapsize increased from 100 to 256, should fix the crash. Faster landscape and movement calculation AY Soundtrack some code optimisations fixed a typo
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead Visit my http://members.inode.at/838331/index.html home page! |
« Next Oldest | Next Newest »
|