I've got a trouble of memory leak. I use Process Explorer to watch my app's status, and find that the "virtual size" keep increasing, and get to 2GB eventually, but the app never crashed.
I use windbg to check the app's memory status, the memory committed and memory reserved are also good(130MB)，in my understanding, the "virtual size" is composed of the memory committed and reserved，but the fact is not. Please tell me how to calculate "virtual size", Thanks very much!
i use this function in my application and have a little issue!
For example Firefox translate URL with tis "ö" to "%C3%B6" and this is ok, now when i use AfxParseUrlEx with URLs who have character like "ö" in this convert it to "%F6" and this is wrong!
I need it converted like Firefox from "ö" to "%C3%B6"!!
Hove to use AfxParseUrlEx so that they should do the same like Firefox?
Use with parameter ICU_BROWSER_MODE don't work!
I hope my question is understandable for other
As mentioned, GetSysInfo() will give you the physical memory, but then you have to ask yourself why you want to know this since half of this is physically reserved for the kernel, but the virtual memory each process runs in will be addressable memory up to 4 GB regardless of what you have physically.
Eric, what I am trying to find is 'guess-timate' (I finally found an occasion to use this word) the amount of memory available to my application (a rather loose statement, I know.. but hopefully gives the idea).
An algorithm in the app that needs quite a lot of memory would need to know if that memory is available or not. Its a dedicated app, there is little chance of some other app requesting a large chunk of memory in parallel.
The memory the algorithm will use is known (or can be approximately figured out based on the input data). So I was hoping that these 2 numbers (available memory and needed memory) would help in a quick decision making as to whether we should proceed with the processing or not.
OK, so in fact you can allocate a massive chunk of memory, because the system will page it out for you if it cant physically fit in RAM. (It will page it out in pages, 4k chunks, so you might want to organise your memory usage so commonly used stuff is on the same page(s) in order to keep it resident in memory)
Also note that "available memory" != "biggest continous block you can allocate". What i mean is something like this:
[1 MB of free memory][2 MB of already allocated memory][3 MB of free memory]
If you query the amount of free memory, you get 4 MB, if you try to allocate a 4 MB block, it will fail because the biggest continous free chunk is only 3MB. I'm just sayinmg because we ran into this already once or twice...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
i had create progress bar which is moving nicely according to my need .
i had two label that is at starting point as (progress) and as (0%).
i want to know how to update the (0%) according to my current positions.
help me out of this .