Heapspace

From SA-MP Wiki

Jump to: navigation, search

heapspace

Image:Farm-Fresh text lowercase.png Note: This function name starts with a lowercase letter.


Description:

Returns the amount of memory available for the heap/stack in bytes.


Parameters:
This function has no parameters.


Return Values:

The free space on the heap in bytes. The stack and the heap occupy a shared memory area, so this value indicates the number of bytes that is left for either the stack or the heap.


Example Usage:

public OnGameModeInit()
{
    printf("Heapspace: %i kilobytes", heapspace() / 1024);
    return 1;
}
Personal tools
Navigation
Toolbox