Re: Strange Memory Problem



KLite wrote:
Is useful to develop a program to scan my files on harddrive, but I
have a strange memory problem: if I check the memory used for my
program, in Windows Task Manager, it reports 140MB (a lot of files),
but this is not true. I'm not leaving memory leaks. The only way to get
the correct memory used, seems to work when I MINIMIZE the main form
window, then if I restore the window, the task manager reports exactly
10MB os memory use, which is correct. That memory is correctly free
when I terminate to revise the report list view.

What is wrong? This seems to be the normal behavior of Delphi, I
already tested this with programs on Demos folder, specially the
complicated Servers... That demos allocates memory and free the
allocated memory correctly, I'm doing the same way. Why Task Manager
reports a lot of memory (certainly, that memory was used, but by the
time I check Task Manager memory for my program, all memory used is
already free.

Nothing is wrong. Windows will release the memory when it needs to (It's faster that way - The application might want that memory back at any instant, so it's better to keep it around). If you open some other large application, Windows will finally get around to dumping that extra memory.


Task Manager doesn't give a useful idea of how much memory your application uses.

Cheers,
Nicholas Sherlock
.



Relevant Pages

  • Re: Unexplainable MEMORY FULL error in 8.2
    ... Loading large file454916496448 ... Can you use Profile Performance and Memory Window to narrow down which specific VIare taking longer to execute and/or using more memory? ... I did that and saved two reports, but I can't see anything outstanding. ... Have you had the opportunity to run this on a *true* Windows box? ...
    (comp.lang.labview)
  • Re: High CPU usage in services.exe and high Page file size
    ... Task Manager is useful but you could look at another freeware utility ... svchost producing the high CPU usage, right click, ... > 2.I didn't installed any memory boosters software before. ... > use high cpu and memory when the windows xp starting. ...
    (microsoft.public.windowsxp.general)
  • Re: Memory Question for Server 2003
    ... The system info reports that there ... >>You must be running Windows Server 2003 Standard Edition ... >>maximum amount of memory that can be supported is 4 GB. ... > Enterprise Edition version ...
    (microsoft.public.windows.server.general)
  • Re: XP Pro - Swap File Size for Modern Systems
    ... >(both windows and non-windows services), and what can be safely stopped? ... Right Mouse Click on the task bar, pick task manager. ... memory you have left. ... >> Windows merges both Physical memory and the Pagefile to create ...
    (microsoft.public.windowsxp.general)
  • Re: RAM Upgrade
    ... I am running Windows Vista x64 SP1. ... When I view system settings indeed the system reports 8.00 GB memory. ...
    (microsoft.public.windows.vista.hardware_devices)