-
Notifications
You must be signed in to change notification settings - Fork 152
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,stdoutandstderruser-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
edis packages asmisc_utils:ed.c, is there a reason to compileedintosashat all? It does save a few (~6-10?) kilobytes of RAM whenedis used, at the cost of losing ~6 KiB of RAM whenedis not used. It's probably the most noticeable such case, as most other programs are indeed significantly lighter in theirsashimplementations.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels