|
-
September 26th, 2006, 02:08 PM
#1
Out of memory
Hello,
My server is using about 80MB of virtual memory, phisically it usually takes 50M. Sometimes I see a Windows message for my server "Out of memory". The server does not crash or stops operating but this message concerns me.
I have 1GB of phisical memory and about 600MB is free.
What could be a reason?
Thanks
-
September 26th, 2006, 02:19 PM
#2
Re: Out of memory
You're running out of memory? Seriously, when you constantly "new" and "delete" chunks of memory, your heap becomes fragmented. When you request memory from the heap, it has to be contiguous, so if you make a request, but there isn't enough contiguous memory available, you will get an "Out of memory" error.
Viggy
-
September 26th, 2006, 02:20 PM
#3
Re: Out of memory
OK, and what does it mean? the memory is not allocated? how can I fix it?
-
September 26th, 2006, 02:31 PM
#4
Re: Out of memory
Yes, the memory is not allocated.
You can fix this by not allocating / de-allocating so much, or hang onto the memory you've allocated. I don't know if there is a programatic way to "clean up" the heap (I would think this would invalidate pointers that are currently in use).
Viggy
-
September 26th, 2006, 03:01 PM
#5
Re: Out of memory
You might be running out of "Desktop Heap"
Here's a discussion on the Desktop Heap
MS Knowledgebase 126962
There is a utility to check the Desktop Heap at the following
MS DHeapMon
I haven't been able to find any discussion on how to verify the Desktop Heap
other than this utility.
-
September 26th, 2006, 03:20 PM
#6
Re: Out of memory
Interesting, I was not aware of the "desktop heap".
Vig.
-
September 26th, 2006, 03:25 PM
#7
Re: Out of memory
 Originally Posted by nazgul27
My server is using about 80MB of virtual memory, phisically it usually takes 50M. Sometimes I see a Windows message for my server "Out of memory". The server does not crash or stops operating but this message concerns me.
The word "server" in this context means "service", I presume.
If so, the the desktop heap may not come into play as most services (especially, better written ones) don't interact with the user i.e. they don't have a window. The Desktop Heap as mentioned in that article is a place where objects like pens, windows, brushes, etc - that are window artefacts are allocated for.
Last edited by Siddhartha; September 26th, 2006 at 03:30 PM.
-
September 26th, 2006, 03:50 PM
#8
Re: Out of memory
no guys, it's not a service, it's just a C++ server I created. I admit that I am using STL intensively and I am holding a lot of info in STL containers. But could that be a problem?
I am not doing a lot of GUI operations there. THere are two listboxes that are filled with simple text lines.
I am having troubles with this Desktop monitor software. WHile being installed it requires Win32K symbol file. I found it in my system and feed it to the installer but no good. Still requires it.
-
September 26th, 2006, 03:59 PM
#9
Re: Out of memory
 Originally Posted by nazgul27
no guys, it's not a service, it's just a C++ server I created. I admit that I am using STL intensively...
Again - what does this "C++ Server" mean?
C++ is just a programming language. Did you mean "An Application programmed in C++"? What is it?
A server is a very specific word when applied to software - like Windows Service (which according to you it isn't one), ATL / COM Server, etc.
I am holding a lot of info in STL containers. But could that be a problem?
Without seeing your code, we can't tell.
In general - STL containers can be used to hold huge amounts of data. However, the nature of the objects stored and the way they are programmed will also influence the way memory is handled. Without looking at code nobody can point fingers at your usage of STL.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|