]> git.sur5r.net Git - cc65/commit
Have _heapmaxavail() work as advertised.
authorOliver Schmidt <ol.sc@web.de>
Thu, 20 Feb 2014 20:03:52 +0000 (21:03 +0100)
committerOliver Schmidt <ol.sc@web.de>
Thu, 20 Feb 2014 20:04:11 +0000 (21:04 +0100)
commitd001a6f1a0ec23366ab435d7673908f9690a99bb
tree5dc354f39ed86e41a3ff94ad89fc30f20df2d469
parent4b085f193e00a3f73cd7a06f19478f8fcf2f81b6
Have _heapmaxavail() work as advertised.

The cc65 doc explicitly states that the return value of _heapmaxavail() can be used as parameter of malloc(). To actually allow for that the size of HEAP_ADMIN_SPACE has to be substracted from the raw size of the largest free heap block.
libsrc/common/_heapmaxavail.s