Heap memory is not re-claiming.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I've a daemon process and I'm allocating heap memory for big character buffers using malloc/free.
Each can take 5MB.

Though I freed/deleted memory allocated for the buffers, the increased memory during the allocation time is not re-claiming back.This I observed using top command.

I'm sure I do not have any other memory leaks. I debugged the code line by line and observing memory usage using top command.
During allocation time, top command showed that 30 MB increase in Virtual & Resident memory.
Upon execution of delete/free statement on the buffers the raised memory was not re-claimed.

On subsequent execution of the same code no extra memory was allocated even though new/malloc statements called on the buffers.What is kernel mechanism  here. Is this due to some page cache re-mapping

If this due to page cache then the memory should always constant trough out process life.
During long run the memory slowly increasing. This should not happen.

Could some body provide any insights into this..

Regards,
Ravi

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux