Skip to main content
Version: 9.0.2

gre.walk_pool

gre.walk_pool(
pool_name
)

This function reports on the memory used by all of the resources loaded into a particular resource pool.

Parameters

ParameterTypeDescription
pool_name#stringThe resource pool whose content should be reported

Returns

TypeDescription
#tableA table with keys as the resources that are contained in the pool and values indicating the number of bytes that a particular resource is using within the system.

Example

-- Display the content of the current image cache
function show_image_cache(mapargs)
print("Images")
local data = gre.walk_pool("image")
for k,v in pairs(data) do
print(" ".. tostring(k) .. "=" .. tostring(v))
end
end