Open
Description
I've been doing some analysis on sash
to figure out any bottlenecks on the user, rather than kernel, side of memory usage. I apologize for the barrage of questions that is to follow:
stdin
,stdout
andstderr
user-side buffers are 1 KB each by default; that's 3 KB of data segment use for pretty much any non-trivial program. Do they need to be this large?- In
sash:cmd_ed.c
(as well asmisc_utils:ed.c
), the maximum search string size is 1 KB; this value is allocated as a constant in the data segment, which is particularly annoying insash
, which forks to load processes. Perhaps, forsash
, one could combine it withcmd_tar.c
'sdblock
(512 bytes) in an union, as the two values won't be used at the same time. - ... Given that a very similar version of
ed
is packages asmisc_utils:ed.c
, is there a reason to compileed
intosash
at all? It does save a few (~6-10?) kilobytes of RAM whened
is used, at the cost of losing ~6 KiB of RAM whened
is not used. It's probably the most noticeable such case, as most other programs are indeed significantly lighter in theirsash
implementations.
Metadata
Metadata
Assignees
Labels
No labels