KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: What are the Memory Values Returned by GET CACHE STATISTICS?
PRODUCT: 4D | VERSION: 12 | PLATFORM: Mac & Win
Published On: April 21, 2011

The GET CACHE STATISTICS command with option "1" returns several different memory values. Here is a description for those values:

Value Description Origin
cacheSize Maximum cache size for the database. This value comes from 4D. Note this is the actual cache that was allocated and might not match the value set in Preferences/Settings.
usedCacheSize Amount of currently used cache. This value comes from 4D.
Physical Memory Size Total RAM on the machine. This value comes from the OS.
Free Memory Free RAM on the machine. This value comes from the OS.
Used physical memory Amount of RAM used by 4D. This value comes from the OS. It is reported as Working Set on Windows, Real Memory on Mac OS X.
Used virtual memory Virtual memory used by 4D. This value comes from the OS. This one is trickier on Windows. It does not correspond to any value in Task Manager, for example. For the curious, 4D calls GlobalMemoryStatusEx and returns (ullTotalVirtual - ullAvailVirtual) of structure MEMORYSTATUSEX.
On Mac OS X this is the same as the Virtual Memory column in Activity Monitor