나는 /proc/pid/smaps
C++ 프로세스의 출력을 분석하고 있었고 많은 수의 개인 메모리 매핑 영역을 발견했습니다. 메모리 매핑 영역의 수는 트래픽에 따라 증가합니다.
메모리 블록을 생성한 코드 부분을 추적할 수 있는 방법이 있습니까? 시도했지만 strace -p <pid>
스택을 생성하는 동안 스택에 액세스할 수 없습니다.
00-7fcea0000000 rw-p 00000000 00:00 0
Size: 65536 kB
Rss: 65520 kB
Pss: 65520 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 65520 kB
Referenced: 65520 kB
Anonymous: 65520 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me nr sd
7fcea4000000-7fcea8000000 rw-p 00000000 00:00 0
Size: 65536 kB
Rss: 65516 kB
Pss: 65516 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 65516 kB
Referenced: 65516 kB
Anonymous: 65516 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me nr sd
7fceac000000-7fceb0000000 rw-p 00000000 00:00 0
Size: 65536 kB
Rss: 65524 kB
Pss: 65524 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 65524 kB
Referenced: 65524 kB
Anonymous: 65524 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
7fceb4000000-7fceb8000000 rw-p 00000000 00:00 0
Size: 65536 kB
Rss: 65528 kB
Pss: 65528 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 65528 kB
Referenced: 65528 kB
Anonymous: 65528 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me nr sd
7fcebc000000-7fcec0000000 rw-p 00000000 00:00 0
Size: 65536 kB
Rss: 65516 kB
Pss: 65516 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 65516 kB
Referenced: 65516 kB
Anonymous: 65516 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me nr sd
7fcec4000000-7fcec8000000 rw-p 00000000 00:00 0
Size: 65536 kB
Rss: 65504 kB
Pss: 65504 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 65504 kB
Referenced: 65504 kB
Anonymous: 65504 kB
AnonHugePages: 0 kB
Swap: 0 kB
332,20 2%