Re: [PATCH] fix uneccesary copy of function bodies for BASH_SOURCE
From:
Chet Ramey
Subject:
Re: [PATCH] fix uneccesary copy of function bodies for BASH_SOURCE
Date:
Mon, 3 Jun 2024 10:53:45 -0400
User-agent:
Mozilla Thunderbird
On 6/1/24 7:15 AM, Koichi Murase wrote:
This patch fixes `bind_function_def' so that it skips the function
body also for the second and later calls. This reduces the memory
uses of Bash for shell functions by almost half.
Thanks for the analysis and patch. This should not have any negative side
effects, even in pretty-print mode, so we'll try it.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/