getProcessMemoryStats | Multi Theft Auto: Wiki Skip to content

getProcessMemoryStats

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns a breakdown of the process memory usage. The reported numbers are always byte units and these numbers can be inaccurate.

Syntax

getProcessMemoryStats ( )

Code Examples

server
setTimer(function()
local div = 1024^2
local pmem = getProcessMemoryStats()
if pmem then
outputServerLog(("[SYS] %.2f MiB rss:%.2f MiB shr:%.2f MiB prv:%.2f MiB"):format(
pmem.virtual / div,
pmem.resident / div,
pmem.shared / div,
pmem.private / div
))
end
end, 5 * 60000, 0)