8000 Researching RAM usage reduction · Issue #2316 · ghaerr/elks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Researching RAM usage reduction #2316
Open
@asiekierka

Description

@asiekierka

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 and stderr 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 as misc_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 in sash, which forks to load processes. Perhaps, for sash, one could combine it with cmd_tar.c's dblock (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 as misc_utils:ed.c, is there a reason to compile ed into sash at all? It does save a few (~6-10?) kilobytes of RAM when ed is used, at the cost of losing ~6 KiB of RAM when ed is not used. It's probably the most noticeable such case, as most other programs are indeed significantly lighter in their sash implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0