Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sizing memory use
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01420721
Message ID:
01420821
Views:
78
Hi Dmitry,

Memory usage is very hard to figure out exactly.... Two small examples:

Printing something on the window for the first time performs a garbage collection. If you print the first result, it'll show less memory used with SYS(1016) and SYS(1011) then subsequent results for the same test.

Strings seem to be stored in two different ways. If you have a string that is up to 7 characters, VFP uses 4 or 8 bytes of handle memory. When the string is 8 characters long, memory usages jumps to 24 bytes. At the same time handle usage increases by 1. It appears as if VFP stores small strings in the value itself just like numeric values, but uses a separate block when the string is longer. The block seems to require 16 bytes for management information.

In other words, if your class has a short name (Label1) it automatically requires less memory than a class with a long name (Textbox1). Nothing to do with the class, just with the default values for various classes.

And that doesn't even involve Windows memory handling with its committed, free, reserved, kernel, virtual, paged, non-paged, heap memory.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform