microsoft.public.windowsce.embedded.vc - Microsoft Windows CE
I've got a server application on Windows XP with a memory problem. It keeps claiming memory. The UNcommitted portion a the heap keeps growing for no apparent reason. And the reserved part of Virtual memory (as a result?) keeps growing too. No where in my program I reserve virtual memory, and I've a minimum of new/delete operations to avoid heap fragmentation. Does any one know what the problem is? How I can fix it? Where I have to look for? Below is some memory info from the application running for 9 days, it's start value -> and the value after 9 day. Available Physical Memory 1576325120 -> 1579347968 bytes Available Virtual Memory 1891962880 -> 1756041216 bytes Virtual Memory Reserved 92573696 -> 223338496 bytes Virtual Memory Committed 163213312 -> 168407040 bytes Heap Committed 3641344 -> 7995392 bytes Heap Uncommitted 6647808 -> 128122880 bytes Number of Heaps 9 -> 9
Hi all, I have a little program that requires a lot of memory. Currently I am finding that malloc is returning NULL when I try to allocate over about 780 MB on a Windows XP Pro machine that has 3 GB of usable RAM. I noticed that the M$ website says "The virtual address space of processes and applications is still limited to 2 GB" but I am seeing half of that. Is the 780 MB limit perhaps due to my using malloc instead of a Win32 function? Thanks.
Hi All My program needs a lot of memory and after allocating some using NEW statement, it returns NULL for any new object created. I guess that is becuase of the heap size limitation of the Visual Studio which stands at 1MB. I need to increase it. One option I found was to set /HEAP:memory in the Link options of project setting. Bur it didn't seem to work. I am getting same problem again. Dows anybody has a opinion about this. regards Nikhil
Is it there a way in C# to free heap memory that has been allocated by an unmanaged component with malloc()? I get an exception when trying to use Marshal.FreeCoTaskMem() on the managed pointer (of type IntPtr) returned from un-managed code as an "out" parameter. In the C-dll this parameter is a double-pointer of my custom structure. I think the reason is that there is no CoTaskMemAlloc() in the ANSI-C-style DLL for allocating this pointer, just malloc(). Any suggestions for a good book or another source on PInvoke and Marshalling different data types (including pointers) back and forth between managed and unmanaged code (like C-style APIs)? Any quide-lines for C# interoperability with ANSI-C code for multi-platforms would be appreciated. Valentina