Re: Free Memory

Tech-Archive recommends: Fix windows errors by optimizing your registry



You have to defined what you mean by "unused memory". There is no mechanism in the
standard storage allocator to return space to the kernel once it is freed (this is
inherent in the way all storage allocators work; see my essay on storage allocation on my
MVP Tips site).

"Crash" is a meaningless term; you have not actually said what happens. Therefore, there
is no way to suggest any possible solution to the problem.

Make sure you have freed up any objects you are no longer using. Otherwise, you have a
storage leak, and the problem is entirely yours. Next, you have to worry about memory
fragmentation, which can cause a memory footprint to monotonically increase. A partial
solution here is to never allocation extremely large blocks of memory (>100K, for example)
but instead figure out how to represent information in smaller chunks, which will reduce
your vulnerability to fragmentation. But the description you give is so vague as to be
impossible to analyze the cause except in the most general terms.
joe

On 1 Dec 2006 03:19:00 -0800, "Mullai" <write2mullai@xxxxxxxxx> wrote:

Hi Friends,

I want to know how to free the unused memory in Windows. When
I run my application the RAM free percentage keeps on decreasing . At
one point of time my application crashes when the system resources goes
very down below 40%. Please anyone help me to overcome this problem.
Actually my application is a pagination software like Quark Express. My
application is in VC++ 6.0 with MFC.

Thanx in advance,
Mulls
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Memory management strategy
    ... > The goal is efficient utilization of small amount of memory - means - ... Example-A Storage Allocator ... Prev by Date: ...
    (comp.lang.c)
  • Re: why swap at all?
    ... On a slow system with small memory you quite often see swapped out ... > still turn on swap so that other 57MB of unused memory isn't wasted. ... Actually the number of totally unused memory is quite small. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: how can i free the physical memory in standby pages
    ... i feel the lag when i bring some unusing program to ... release the process' unused memory back to the OS. ... if/when you need the memory back it will have to be reallocated from the OS. ... do not free the global page cache. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Free Memory and Tasks
    ... > and every day my free memory decrease. ... Normally, this is a good thing, since "free" memory is unused memory ... so you're better off doing an aptitude purge apache2. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: [PATCH][v2.6.29][XEN] Return unused memory to hypervisor
    ... Return unused memory to hypervisor ... memory lower then is assigned to guest, ... Comparing both kernels I found code for returning unused memory to ...
    (Linux-Kernel)