init/do_mounts_rd.c memory leak

init/do_mounts_rd.c memory leak

Post by Hollis Blanchar » Sat, 24 May 2003 21:20:09



Another potential memory leak the Stanford checker caught at 2.5.48:
while closing and opening floppy disks, buf could be allocated and
never freed.

--
Hollis Blanchard
IBM Linux Technology Center

  mount-rd-free.diff
< 1K Download
 
 
 

1. memory leaks by shared memory and fork

Hi,

i've a problem with a server-program. It consums memory and never release
the memory. Even if i kill the program the memory never comes back.

When the program starts, it allocate a bunch of RPC-client connections, and
stores them in an shared-mem region (created with mmap() PROT_READ |
PROT_WRITE, MAP_SHARED | MAP_ANON ).
When my program receives an RPC-call it calls fork(), the child takes one of
the free connections from the pool, mark it as busy, and route the RPC via
the connection to another server.
Before the child process terminates (via exit() ) it marks the connection as
free.
The parent process runs in an loop, and waits for new RPC-calls or SIGCHLD
when a child terminates.

That what makes me "unhappy" is, that every fork consum 4kb, and the memory
is never released. There is no malloc (new) after the fork.
The child only read/write the mmap-memory.
There is only a special handling for broken RPC-connections. Then the server
(in the child process) replace the broken connection with a new one. But
this happens very rare.

Has anyone a good idea whats the reason for this behavior?

Okay, the system is a RH8.0 standard installation. Nothing is patched or
changed.
I get the same results on RH7.2 or SuSE 7.3. Under Solaris 9 happens nothing
and the program works as designed!

best regards
Joerg

2. CC: CVTOMF - Cannot open temporary file - Any one know why ?

3. Sun workshop memory monitor does not detect all memory leak

4. Sendmail, .forward problem using linux to a mail-hub

5. 64bit solaris 2.8 memory name resolution memory leak?

6. Redhat stuck after a few days.

7. How can I recover memory from a memory leak

8. Partition Limits on 2.4 and 2.5??

9. mm/memory.c, 2.4.1 : memory leak with swap cache (updated)

10. How to find out the memory size used by a process or check its memory leaking?

11. Memory Leaking. Help!

12. KDE v1.1.2 leaking memory?

13. Memory leak in accept(), Solaris 2.5.1