Next Previous Contents

3.4 _heapmemavail

Function

Return the total available space on the heap.

Header

stdlib.h

Declaration

size_t __fastcall__ _heapmemavail (void);

Description

The function returns the total number of bytes available on the heap.

Limits

  • This function is of less use than usually assumed, since the returned heap space may be available but not in one block. So even if this function says that several times more heap space is available than needed, malloc may still return NULL.

Availability

cc65

See also

_heapadd, _heapblocksize, _heapmaxavail, calloc, free, malloc, realloc

Example

None.


Next Previous Contents