lkml.org 
[lkml]   [1998]   [Mar]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From ketil@ii ...
SubjectRe: New Feature Idea: Configurable text(msgs)
Date18 Mar 1998 11:32:33 +0100
On the topic of numeric/shorthand/binary error messages in the kernel, I 
did a few measurements.  Here they are:

grepping out all strings (probably only one-line strings, are there
multi-line error messages) and counting characters:

% for a in `cat /tmp/chfiles.kernel.list` ; do
egrep '"(.|[$^])+"' $a
done > /tmp/strings.in.kernel
%  cut -d\" -f2 /tmp/strings.in.kernel | wc -c
1163971

In other words, the strings in the kernel take up about a megabyte.  For 
my configuration, I did:

$ strings vmlinux | grep '........' | wc -c
81902
(The grep is for cutting away characters that just happen to be
printable) So that's 80K of a running kernel, or about 10% of the size
"wasted" on strings.

Presumably this could make a difference in systems short on RAM, like in 
an embedded environment?  It doesn't sound too bloated for general
server use, though - in particular, since the "bloat" would have to
reside elsewhere (OK, so it could be swapped out more easily)

~kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008