FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
on Memory Space
on Memory Space
Débuté par Binod Lohani, 12 jan. 2018 12:31 - 2 réponses
Connectez-vous…
Binod Lohani
#1
Posté le 12 janvier 2018 - 12:31
Hello Gang !
Say,
stMyStructure is structure
s1 is string
s2 is int
s3 is boolean
...
...
...
End
Now Does this stMyStructure Occupy Memory space ?? How to find it ??
After initiating the variable
stRec is stMyStructure
stArr is Array of Structure
Now (I haven't Stored Any value to the Variable yet), Does these Variables stRec and stArr occupy Space in Memory ?? How to find it how much is occupied ??
And Now After Storing Values to the Variables stRec and stArr how Much Space would be Occupied in Memory ?? How to find it ??
Thanks !!
Signaler
0
0
Fabrice Harari
#2
Posté le 12 janvier 2018 - 13:51
Hi
AFAIK,
stMyStructure is structure
s1 is string
s2 is int
s3 is boolean
...
...
...
End
Now Does this stMyStructure Occupy Memory space ?? How to find it ??
NO, it's a DEFINITION hat exists in your source and will be used only when declaring a variable.
After initiating the variable
stRec is stMyStructure
stArr is Array of Structure
Now (I haven't Stored Any value to the Variable yet), Does these Variables stRec and stArr occupy Space in Memory ?? How to find it how much is occupied ??
YES, the exact same way than when you are doing i is int on 4.... As soon as you execute that code, 4 bytes are allocated/reserved for the variable. And there IS a content anyway, the default value for this type of variable for an int, it's ZERO).
>And Now After Storing Values to the Variables stRec and stArr how Much Space would be Occupied in Memory ?? How to find it ??
It depends on the variable. An int on 4 uses 4 bytes, a variable length string uses a variable memory (based on the length), a fixed length string uses the declared length (+/- 1 depending on the type pf fixed length)
Of course, this does NOT take into account the system pointers that are use by the variable management system, as SOMETHING has to keep track of the nameaddresses of all that.
Best regards
Signaler
0
0
Paulo Oliveira
#3
Posté le 12 janvier 2018 - 14:49
Did you try the get that info using the Dimension (Function)?
https://doc.windev.com/en-US/…
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte