Opened 6 years ago

Last modified 4 years ago

#14332 new bug

fork() leaks (?) heap areas

Reported by: waddlesplash Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

  1. Compile attached test program.
  2. Run it. Observe that system memory usage climbs +200MB before the fork, as expected.
  3. Observe that system memory usage climbs +400MB after the second pair of memory sets.

Changing the SIZ constant shows that the second round of sets will always consume 2x as much memory as expected.

Attachments (1)

forktest.cpp (389 bytes ) - added by waddlesplash 6 years ago.

Download all attachments as: .zip

Change History (3)

by waddlesplash, 6 years ago

Attachment: forktest.cpp added

comment:1 by waddlesplash, 6 years ago

I note that in ProcessController, both processes are supposedly using only 200MB each, but the kernel memory usage increases 200MB. (After the process exits, all memory returns to the way it was before.) Running listarea at each pause point and then diffing the results finds nothing of consequence in the kernel.

comment:2 by waddlesplash, 4 years ago

Not only is this still a bug, I now notice that swap usage increases by 470MB in addition to main memory usage increasing by 600MB at peak.

Note: See TracTickets for help on using tickets.