Heap size change too much


(Qingyunha) #1
$  sudo strace -qq  -f -e madvise,brk -p  1234
[pid  2323] brk(NULL)                   = 0x1092000
[pid  2323] brk(NULL)                   = 0x1092000
[pid  2323] brk(0x10b3000)              = 0x10b3000
[pid  2323] brk(NULL)                   = 0x10b3000
[pid  2323] brk(NULL)                   = 0x10b3000
[pid  2323] brk(NULL)                   = 0x56538b58b000
[pid  2323] brk(NULL)                   = 0x56538b58b000
[pid  2323] brk(0x56538b5ac000)         = 0x56538b5ac000
[pid  2323] brk(NULL)                   = 0x56538b5ac000
[pid 12568] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2323, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
[pid  2367] brk(NULL)                   = 0xff2000
[pid  2367] brk(NULL)                   = 0xff2000
[pid  2367] brk(0x1013000)              = 0x1013000
[pid  2367] brk(NULL)                   = 0x1013000
[pid  2367] brk(NULL)                   = 0x1013000
[pid  2367] brk(NULL)                   = 0x55d9c9efb000
[pid  2367] brk(NULL)                   = 0x55d9c9efb000
[pid  2367] brk(0x55d9c9f1c000)         = 0x55d9c9f1c000
[pid  2367] brk(NULL)                   = 0x55d9c9f1c000
[pid 12536] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2367, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
[pid  2414] brk(NULL)                   = 0x128b000
[pid  2414] brk(NULL)                   = 0x128b000
[pid  2414] brk(0x12ac000)              = 0x12ac000
[pid  2414] brk(NULL)                   = 0x12ac000
[pid  2414] brk(NULL)                   = 0x12ac000
[pid  2414] brk(NULL)                   = 0x564bb31a3000
[pid  2414] brk(NULL)                   = 0x564bb31a3000
[pid  2414] brk(0x564bb31c4000)         = 0x564bb31c4000
[pid  2414] brk(NULL)                   = 0x564bb31c4000
[pid 12530] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2414, si_uid=0, si_status=0, si_utime=0, si_stime=0} --

The brk syscall call change too much, and the value seem not match the maps file.

sudo cat /proc/1234/maps | grep heap
01a73000-01a94000 rw-p 00000000 00:00 0                                  [heap]