Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / General Programming / About memory usage Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

May 24, 2005, 08:12 AM

Hi all,

I have a little exe using some dll as plugins (classic stuff : opengl renderer in a dll, direct input keyboard management in another dll and so on). Everything is done with VC6 on windows XP.

when I launch the exe, the memory usage shown in task manager looks OK, but the memory usage in the performance tab grows up a lot. I discovered that the task manager can show some other statistics about the memory usage, so I ask for a max memory usage and a VM size column, and here is what I get :

so as you can see :

Memory usage : 2120 Kb
Max memory usage : 99064 Kb
VM size : 288748 Kb (ouch !)

I'm not doing so much memory allocation in my exe nor in my dll and I think each time I load a new dll, it allocate some memory it never release.

Am I right ? is there a way to minimise the memory allocated by each dll ?

Any other ideas about this huge difference between memory usage and VM size.




May 24, 2005, 08:16 AM

Warning. When you click on the link you will see a lot of boobs and hard-ons


May 24, 2005, 08:22 AM

Yeah, that's really bad. You shouldn't be posting here...


May 24, 2005, 08:23 AM

Houps, I didn't realise this, I just removed the pic and will try to find another way to upload it somewhere...


May 24, 2005, 08:24 AM

Yeah didn't realise that, I removed the pic sorry


May 24, 2005, 08:33 AM

Here is the pic again on a site with no sex ads (I hope !)


Patrick Grawehr

May 24, 2005, 04:13 PM

kiddygames wrote: I'm not doing so much memory allocation in my exe nor in my dll and I think each time I load a new dll, it allocate some memory it never release.

ASFAIK that is absolutelly Ok. Every dll you load uses some of the virtual memory address space of your application. That means, it is mapped to your app's memory, but can also be loaded to other processes without increasing the overall system memory usage. (Well, it uses some memory specifically for each process, but not much).

Did you really mean that the memory usage on the performance tab is increasing? Not on the process tab? *confused* Maybe there's something else also going on here...


May 24, 2005, 04:45 PM

Large memory-mapped file open ?


May 25, 2005, 06:58 AM

After looking at my build settings, I realise I was using multithreaded.

With a "multithreaded dll" build, I now have an acceptable 50Mo VM size.




May 25, 2005, 07:19 AM

Where are the boobs? I'm always a latecomer...


May 25, 2005, 08:47 AM

Well, host your images freely, but they don't tell that there are boobs (and more) on the page hosting your picture...


This thread contains 11 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.