PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → exeMemory values not correct
exeMemory values not correct
Started by Jiva SZTRAKA, Mar., 30 2018 3:31 AM - 7 replies
Registered member
12 messages
Popularité : +1 (1 vote)
Posted on March, 30 2018 - 3:31 AM
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 modified, March, 30 2018 - 3:47 AM
Posted on March, 30 2018 - 3:09 PM
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
Registered member
12 messages
Popularité : +1 (1 vote)
Posted on March, 30 2018 - 4:23 PM
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?
Registered member
12 messages
Popularité : +1 (1 vote)
Posted on April, 02 2018 - 2:40 AM
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!
Registered member
12 messages
Popularité : +1 (1 vote)
Posted on April, 21 2018 - 2:54 AM
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?
Registered member
939 messages
Popularité : +66 (68 votes)
Posted on April, 23 2018 - 10:45 AM
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
Registered member
939 messages
Popularité : +66 (68 votes)
Posted on April, 23 2018 - 2:12 PM
*LengthToString()

sorry

sample :



Registered member
12 messages
Popularité : +1 (1 vote)
Posted on April, 24 2018 - 4:44 AM
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 modified, April, 24 2018 - 4:49 AM