Home Contents | # debug.free | Debug | Core4 Lua Commands

## SYNOPSIS

str = debug.free([mode])

## DESCRIPTION

Provides information about used memory resources. The optional mode argument specifies:

0 | General memory usage
1 | Zone allocator statistics
2 | Slab allocator statistics
3 | Kernel malloc pool statistics
4 | Buffer cache statistics
5 | Virtual memory mapping of current process

## NOTES

The output is meant for printing on a terminal and contains VT100-like escape codes for formatting.
Never parse the output of this function programmatically. It is only meant for human consumption.

## EXAMPLE

>
print(debug.free())
total used free shared buffers cached Mem: 128MB 4.87MB 123.12MB 0B 64kB 122.75kB Adjusted: 4.69MB 123.3MB

## SEE ALSO

debug.ps, debug.dump