heapSpace

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the heapSpace
heapSpace()
Summary

Returns the number of free bytes in the application heap on Mac OS systems.

Introduced1.0
OSmac
Platformsdesktop, server
Example
the heapSpace
if the heapSpace < 1024^2 then suggestLowMemory
Values
NameTypeDescription
return

The heapSpace function returns a positive integer.

RelatedProperty: size, alwaysBuffer, destroyStack
Function: hasMemory, stackSpace
Glossary: byte, Mac OS, return
Control Structure: function
Description

Use the heapSpace function to determine how much free memory remains.

This function exists to aid compatibility with imported HyperCard stacks. It may not return the exact amount of free memory. It also does not take available temporary memory into account.

On Unix and Windows systems, this function does not return a meaningful value.