On 11/15/19 1:59 PM, gwes wrote:
TECOC from github...
For general amusement:
without video (curses)
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1000 29775 86827 0 28 0 540 1296 - T p2 0:00.00 ./tecoc
$ size tecoc
text data bss dec hex
102449 13096 13424 128969 1f7c9
with video (curses)
$ size tecoc
text data bss dec hex
114772 13456 12432 140660 22574
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1000 82440 86827 0 28 0 808 2296 - T p2 0:00.01 ./tecoc
for comparison:
$ size /bin/ed
text data bss dec hex
207704 10800 24264 242768 3b450
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
1000 75971 86827 0 3 0 256 196 - Tp p2 0:00.00 ed
Interesting to note that the text size of ed(1) is almost twice that
of vi.
RSS is larger for teco. 1.3MB isn't too bad, though.
On disk:
12412$ ls -l tecoc
-rwxr-xr-x 1 xxxx xxx 256920 Nov 15 13:48 tecoc*
12494$ ls -l /bin/ed
-r-xr-xr-x 1 root bin 229928 Apr 13 2019 /bin/ed*
As Mr. Davis kindly points out, everything in /bin is statically linked.
With -Bstatic
$ ls -l tecoc
-rwxr-xr-x 1 xxxx xxxx 1472504 Nov 15 15:47 tecoc*
Still not huge. I don't know what the current upper limit for
programs in the install medium is. As this is a totally irrelevant
thread, I suspect that squashing teco into the single install
executable would only raise it 250K because it uses only very
vanilla libraries.
Geoff Steckel