Commit graph

2 commits

Author SHA1 Message Date
William Wilgus
0a88b818e9 lua make memcheck script eat all available ram (incld audiobuf)
Change-Id: Ia202c9097324985a3a9a9c96be8422c38e79cb3e
2024-12-26 01:49:01 -05:00
William Wilgus
ef34126913 lua add better memory stats
lua gives you a memory used number that only reflects the current allocations
if fact it doesn't even give you a way to get the amount of ram free

rb.mem_stats() seeks to fill this gap by marking the memory allocated for lua
with a sentinel value which can later be checked to get a high water mark
of the ram used by lua and a pretty good idea of how much ram is available

Also includes an example script
usage:
used, allocd, free = rb.mem_stats()

Change-Id: Ia282869f989848324d7d88c7df4827fdbce4fb4e
2020-10-05 11:53:27 -04:00