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
| Parameter | Type | Description |
|---|---|---|
pool_name | #string | The resource pool whose content should be reported |
Returns
| Type | Description |
|---|---|
#table | A 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