SPUG: reducing memory footprint of forked children?

Benjamin Franks benjamin at dzhan.com
Wed Feb 13 10:28:39 CST 2002

In programs where a parent forks off a number of child processes, is there
a way to reduce the memory footprint of the child processes?  If I
understand correctly, the child inherits a duplicate copy of the parents
variables, etc..  Can the child explicitly undefine parent variables the
child doesn't need?  What about unecessary modules the parent needs that
the child doesn't---can modules be unloaded in the child?  Even if these
techniques did reduce the memory consumption of the child, would it be
visible on a program like top (or something similar) or would the memory
be unused but held until child death?  Is there a way to force a
reallocation of unused memory while the child is running, or is that more
of an OS issue?

--Ben Franks

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org

More information about the spug-list mailing list