PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → exeMemory values not correct
exeMemory values not correct
Débuté par Jiva SZTRAKA, 30 mar. 2018 03:31 - 7 réponses
Membre enregistré
12 messages
Popularité : +1 (1 vote)
Posté le 30 mars 2018 - 03:31
Hi guys - just seeing if anyone here might be able to assist ...

Not sure if I'm doing something wrong or if it's a Windev bug - but when I pull the memory usage values of running processes via the ExeListProcess(exeShortName, exeMemory) function - the values are way off from the memory values listed on Windows Task Manager.

Of course I divide the values by 1,000,000 (assuming the original value is in bytes) - however still way off from reality.

For example right now I see my Firefox.exe has a total memory usage of around 295 MB - and in my WinDev app it shows as 0 (for each running instance). Not all are showing 0, some are a little closer to reality but still quite off from the Task Manager values - so not sure what's up.

Can anyone perhaps try and replicate this issue to confirm if it's just my end or not?

Cheers
Message modifié, 30 mars 2018 - 03:47
Posté le 30 mars 2018 - 15:09
Hi Jiva,

Of course I divide the values by 1,000,000 (assuming the original value
is in bytes) - however still way off from reality.


Did you try NOT to divide by 1000000, just in case your assumption is
incorrect?

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com



For example right now I see my Firefox.exe has a total memory usage of
around 295 MB - and in my WinDev app it shows as 0 (for each running
instance). Not all are showing 0, some are a little closer to reality
but still quite off from the Task Manager values - so not sure what's up.

Can anyone perhaps try and replicate this issue to confirm if it's just
my end or not?

Cheers
Membre enregistré
12 messages
Popularité : +1 (1 vote)
Posté le 30 mars 2018 - 16:23
Hi Fabrice - yes the reason I decided to divide by 1000000 is because I looked at the raw data first and can see that the exeMemory values are 7 or 8 digits (or else 0) - which I can only assume is bytes. I also tried confirming this by reading all the information on the function information page but there are no details on this.

It'd be interesting to see if you notice the same issue on your end?
Membre enregistré
12 messages
Popularité : +1 (1 vote)
Posté le 02 avril 2018 - 02:40
Can anyone please try and replicate this problem so I can establish whether or not this is a bug that needs to be reported?

Simply need to use the ExeListProcess(exeShortName, exeMemory) function to get the memory usage values of running processes and compare them with the memory usage values in Windows Task Manager. Unless I'm mistaken you'll need to divide the Windev values by 1000000 (to convert from bytes to MB) - and then see if the Windev -> Task Manager values match up (within reason).

Any help would be much appreciated!
Membre enregistré
12 messages
Popularité : +1 (1 vote)
Posté le 21 avril 2018 - 02:54
Grr... Frustrating! I've completed my Windows desktop application in just about all areas except this issue still remains!

Can anyone *PLEASE* spare a minute or two to try and replicate this problem and confirm whether or not it is a bug or not?
Membre enregistré
940 messages
Popularité : +66 (68 votes)
Posté le 23 avril 2018 - 10:45
Hi,

Windev return ( Private Memory + Shared Memory ) , so in Windows Task Manager, select columm ( in Details ) , and and Memory Shared info

And you have a Windev Funtion to convert in string memory value, LenghtToSting()
=> https://doc.windev.com/en-US/…

And when you receive 0 for a process, it's frequently restriction access.

Good Windev ;)

Bye
Membre enregistré
940 messages
Popularité : +66 (68 votes)
Posté le 23 avril 2018 - 14:12
*LengthToString()

sorry

sample :



Membre enregistré
12 messages
Popularité : +1 (1 vote)
Posté le 24 avril 2018 - 04:44
Hi Christophe - thank you for replying

Thanks for introducing me to the LengthToString() function, I didn't realize it existed!

As for the incorrect memory values though - I'm still seeing same issues...

For example right now I'm using Firefox browser, and in my Windows Task Manager (both Details or Processes tab), I can see Firefox is consuming quite a bit of memory (multiple instances over 200 MB). Yet in Windev it returns 0. I expect maybe some system processes to be restricted to see values, but why Firefox?

Also in most instances even where the values > 0, the Windows Task Manager values are still quite different from the Windev values - typically Windev values are 20-30% higher than Windows values.

I know this problem wouldn't be a huge priority for PC Soft and most users but I thought it should be brought to the attention of PC Soft in the case that it is a bug on their end that can be fixed in future updates without too much work.
Message modifié, 24 avril 2018 - 04:49