This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Huge chunks of anonymous memory


Hi,

Hey I tried to run the process with MALLOC_MMAP_THRESHOLD_ as 0
and the huge chunks are still in my mapped memory, and the heap size
remains around the same.

And I tried with the strace thing too, the mempry is not mapped by
mmap or brk or something else.

So then I tried mtrace, muntrace
and grepped the addresses mapped by the same region where these huge
chunks are mapped
and I saw something strange.

00007fbef8000000     536       -       -       - rw---    [ anon ]
00007fbef8086000   65000       -       -       - -----    [ anon ]
00007fbf00000000     712       -       -       - rw---    [ anon ]
00007fbf000b2000   64824       -       -       - -----    [ anon ]
00007fbf0527d000    6252       -       -       - rw---    [ anon ]

This is the pmap output ( a part of it showing the huge chunks)

And now look at the grepped mtrace output

ubuntu@ubuntu:~$ cat  trace.log | grep 7fbef8086000
@ /home/ubuntu/glibc/local/lib/libstdc++.so.6:(_Znwm+0x25)[0x7fbf06348c1d]
+ 0x7fbef8086000 0xa0
@ /home/ubuntu/glibc/local/lib/libstdc++.so.6:(_ZdlPv+0x1c)[0x7fbf06346c68]
- 0x7fbef8086000
@ /home/ubuntu/glibc/local/lib/libstdc++.so.6:(_Znwm+0x25)[0x7fbf06348c1d]
+ 0x7fbef8086000 0xa0
@ /home/ubuntu/glibc/local/lib/libstdc++.so.6:(_ZdlPv+0x1c)[0x7fbf06346c68]
- 0x7fbef8086000
@ /home/ubuntu/glibc/local/lib/libstdc++.so.6:(_Znwm+0x25)[0x7fbf06348c1d]
+ 0x7fbef8086000 0x38

_Znwm is the mangled name for "new" and _ZdlPv for "delete", so what
it is basically
saying is that the address 0x7fbef8086000 was allocated by "new" but
not freed and then its saying that
0x7fbef8086000 is trying to be freed by "delete", but it was never
allocated in the first place !!! WTF !!!

Cheers,
Vinu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]