Re: [cc65] Show free RAM?

From: Tom Watt <tom719co1gmail.com>
Date: 2009-12-29 03:10:57
What does the heap include?

When I tried printf'ing _heapmemavail() I got -19262.  I then added
65536 and got 46274.  When I did the BASIC command PRINT FRE(0) +
65536 afterward I got 36131.  Does this mean I had ~10k more RAM
available when the cc65 program was running?  If so, why?

Thanks,

Tom

On Sun, Dec 27, 2009 at 12:53 PM, Marc 'BlackJack Rintsch
<marc@rintsch.de> wrote:
> On Sunday 27 December 2009, Tom Watt wrote:
>
>> I've been looking for a bit here, but is there a function that
>> returns the total free RAM on a Commodore 64?
>
> The documentation for the `malloc()` function mentions `_heapmaxavail()
> and `_heapmemavail()` in the `See also` section.
>
> Ciao,
>        Marc 'BlackJack' Rintsch
> --
> “Adapting old programs to fit new machines usually means
>  adapting new machines to behave like old ones.”
>                                       -- Alan J. Perlis
>
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Dec 29 03:11:05 2009

This archive was generated by hypermail 2.1.8 : 2009-12-29 03:11:08 CET