Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sizing memory use
Message
De
26/08/2009 12:44:27
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01420721
Message ID:
01420865
Vues:
45
>>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.
>
>Thank you for illustrating the point, Christof. I was playing with creating objects and checking memory functions SYS(1016) and SYS(1001) and had some weird results. So I gave up.
>
>Basically I was thinking about using a form class as a base for my BO object. But aside from the memory, I tested the time it takes to load these type of objects into the memory and it takes considerably more time than, say, custom class.

I think you will have better results using a custom or session class. do you really need an init?

Look at this:

http://fox.wikis.com/wc.dll?Wiki~TestMemoryCreateDestroy~VFP
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform