History log of /external/kmod/shared/strbuf.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dea2dfee9b301da84dbb09cf510b8ebf2ef28fff 26-Dec-2014 Lucas De Marchi <lucas.demarchi@intel.com> Remove FSF mailing address

It has changed in the past, and these days, anyone can get a copy of the
LGPL via the web rather than by post.

Like 657a122 (Remove FSF mailing address) in libabc by Josh Tripplet,
but let the FSF website in which the license can be found.
/external/kmod/shared/strbuf.c
e62d8c725b73cc03efc01df59bf5cc5a5fa31b5d 17-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> strbuf: make strbuf_pushchars() a little less dumb

Do not push one char at a time. We have strlen() and memcpy() to rely
on.
/external/kmod/shared/strbuf.c
8863154e446d6b60ff6afd6572ce5d9c9651a59c 17-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> strbuf: do not calculate next step in size on all calls

We only need to check if the new size is less or equal than the current
size. We don't really need to calculate the next step.
/external/kmod/shared/strbuf.c
405b8927fe36df633f70cbed74f1aab1fea0b947 17-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> strbuf: reduce default buffer size

Using 2048 as buffer sizer for strbuf is a bit exaggerated. strbuf is
used much more when we are not using mmapped indexes, but it's used for
mmapped when for example searching for an alias. A quick and dirty hack
to output the size of our strbufs is to print buf->used inside
strbuf_str(). Doing this and creating some statistics with:

while read xxx alias xxx; do
tools/modprobe -R "$alias" > /dev/null;
done < /lib/modules/$(uname -r)/modules.alias 2>&1 | \
Rscript -e 'summary (as.numeric (readLines ("stdin")))'

Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
1.00 29.00 31.00 31.55 38.00 92.00 26

So, reduce the step to 128, which is still greater than the maximum in
these cases. In the worst case this can only create a few calls to
realloc(), while keeping the memory footprint low for the common cases.
/external/kmod/shared/strbuf.c
15a7ae30b36a5a2d50e9b1bfadc30c766a874bff 11-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> shared: rename prefixes of strbuf functions

Use strbuf_ prefix instead of buf_.
/external/kmod/shared/strbuf.c
b4d1f44af16809e70ac5800c7539875832757679 11-Oct-2014 Lucas De Marchi <lucas.demarchi@intel.com> Move strbuf implementation to shared/

Just move the strbuf-like implementation to shared/. No renames were
made yet to avoid cluttering the diff. It will come in a separate patch.
/external/kmod/shared/strbuf.c