On Mon, Jun 12, 2017 at 11:35 PM, Willard Goosey <goo...@sdc.org> wrote:

>
>
> >Is malloc/free implemented?
>
> Nope. The full Small-C spec (I dug up the 1984 book!) calls for an
> AVAIL() function that I should implement.
>
> A Malloc arena would, properly, start immediately above RAM files and
> grow upwards... Except that filespace can grow! Oops! I don't think
> that's a place I want to go.
> >
>

Thanks for the responses.

I'll give some thought to a "heap". One idea would be to just allocate a
heap on the stack.

I think the stack grows downward from HIMEM towards files that grow up from
low RAM. It's basically the programmer's problem to worry about it.

I'm not sure a guard is possible because, yeah, files grow at runtime. So
it would be expensive to constantly monitor.

Though if we create a file management library it could probably be done
efficiently if the programmer agrees to only use the file management
library to mess with files.

-- John.

Reply via email to