HomeFreeBSD

sh: Move some stackmarks to fix high memory usage in some loops.
rS245698Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

sh: Move some stackmarks to fix high memory usage in some loops.

If a loop contained certain commands (such as redirected compound commands),
the temporary memory for the redirection was not freed between iterations of
the loop but only after the loop.

Put a stackmark in evaltree(), freeing memory whenever a node has been
evaluated. Some other stackmarks are then redundant; remove them.

Example:

while :; do { :; } </dev/null; done

Details

Provenance
jillesAuthored on
Parents
rS245697: zfs/sparc64 boot: fix booting after r242230
Branches
Unknown
Tags
Unknown

Event Timeline