[A83] Re: Malloc


[Prev][Next][Index][Thread]

[A83] Re: Malloc




> Van: Kirk Meyer <kirk.meyer@colorado.edu>
> 
> Unlike the 86 where there is 15kb of free memory, malloc functions on the
> 83+ would require creation of a temporary appvar or use of free memory
(this
> is not recommended). APPS that require large amounts of free RAM in order
to
> run would seem rather ill behaved, IMHO. If you look at page 17 of the
SDK
> guide, there are 3158 bytes worth of RAM areas marked as potentially
safe.
> For 50-100 bytes you might consider using the temporary swap area
mentioned
> on page 17.

Oh thank you, I didn't know Ti had also packed some info in their SDK about
the safe RAM areas... The problem only is that, the APD-buffer could/will
be used by the grayscale routine.Wwe now use an in-program buffer, not very
conveniant, plus you can't write to there in an App. In some time there
will also be some file-handling routines, which *could* also use the
(un)archiving routines in the ROM, which overwrite the tempswap area. But
until then, the space there is enough.
I could also chose for statvars, it will be much more difficult to
implement using statistics in C then creating file-routines.

> Has the base code problem with z88dk been fixed? The last time I looked
at
> it, it required more than 9kb just for the C startup code.. that's
> ridiculous. You'd only be able to write 7kb worth of C code (fills up
pretty
> fast when it's C), before you'd go into a 32kb slot.

Huh?

I know there is/was some sort of space problem, because of the VT-ANSI
engine (text display). This routine takes about 4-5kb, from which 2kb alone
is the printf() routine, and the rest is character-sprite data + sprite
clipping routine. But if you use the non-ansi routines things are much
smaller because these use the TIOS built-in routines.

BTW: I've already got some programs in sizes of 800 bytes (demo samples),
and some game (DStar) which is 3kb. So I don't exactly know what you are
talking about (sorry)...




Follow-Ups: