Memory(), Sys(12), Sys(1001), Sys(1016), Sys(23), Sys(24)
These are all memory-related functions. In Visual FoxPro, only three of them return anything even remotely useful. SYS(1001) tells you the size of the virtual memory pool available to Visual FoxPro. SYS(1016) tells you how much memory is currently occupied by user-defined objects. The undocumented MEMORY(1) returns SYS(1001)/1024—that is, the virtual memory pool in KB.
Usage |
nMemoryPool = SYS( 1001 ) nMemoryInUse = SYS( 1016 ) nMemoryPoolInKB = MEMORY( [ 1 ] ) |
Example |
* The first results come from VFP 6 ? SYS(1001) && Returns 266027008 on Tamar's 64-meg machine ? SYS(1016) && Returns 272840 right after startup && on that machine with a fairly minimal CONFIG.FPW ? MEMORY(1) && Returns 259792 on that machine * These results come from VFP 7. ? SYS(1001) && Returns 1070792704 on Tamar's 256-meg machine ? SYS(1016) && Returns 353084 right after startup && on that machine with a fairly minimal CONFIG.FPW ? MEMORY(1) && Returns 1045696 on that machine |
See Also |