procps/proc
Jim Warner 95d0136281 library: dynamic buffer management even more efficient
One recent patch to dynamic buffer management involved
over-allocating the buffer increase to lessen calls to
xrealloc. That was successful, but the actual increase
amount did not attempt to optimize size or alignments.

With this commit, we'll copy an approach recently used
by the top program and round up buffer sizes to 1 KiB.
More importantly, while buffers are quickly reaching a
KiB optimum multiple, no memcpy will ever be employed!

To illustrate just how effective top's algorithm would
be, just change the initial and subsequent allocations
from the current 1024 bytes to just a single byte then
add an fprintf.  Those one byte reallocations while on
the way to optimum buffer size will be a one-time cost
and won't represent any recurring performance penalty.

( gosh, that top program *must be* one fart smeller, )
( or was that a smart feller, i can't remember which )

Reference)s):
commit 6d605f521c
commit a45dace4b8

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-04-24 08:29:22 +10:00
..
alloc.c pmap: use correct types for memory allocation 2012-11-06 22:22:11 +11:00
alloc.h pmap: use correct types for memory allocation 2012-11-06 22:22:11 +11:00
COPYING miscellaneous: clean up trailing whitespace once again 2013-04-07 18:05:01 +10:00
devname.c miscellaneous: clean up trailing whitespace throughout 2013-03-14 12:36:47 +01:00
devname.h Change restrict to __restrict in public includes 2012-01-09 21:44:51 +11:00
escape.c miscellaneous: clean up trailing whitespace once again 2013-04-07 18:05:01 +10:00
escape.h Change restrict to __restrict in public includes 2012-01-09 21:44:51 +11:00
ksym.c miscellaneous: clean up trailing whitespace throughout 2013-03-14 12:36:47 +01:00
libprocps.pc.in Renaming libprocfs to libprocps 2011-12-23 09:18:43 +11:00
libprocps.sym Expose freeproc for libproc 2013-01-01 13:13:44 +11:00
Makefile.am Update library version-info to 2.1.1 2013-03-26 21:41:55 +11:00
procps.h Two new options for pmap, -X and -XX 2012-09-27 22:08:04 +10:00
pwcache.c docs: clarification to license headers in files 2012-03-03 18:41:11 +11:00
pwcache.h better handling of long usernames 2004-07-20 23:31:12 +00:00
readproc.c library: dynamic buffer management even more efficient 2013-04-24 08:29:22 +10:00
readproc.h library: fix proc_t page fault delta counts alignment 2012-10-02 20:56:39 +10:00
sig.c docs: clarification to license headers in files 2012-03-03 18:41:11 +11:00
sig.h Change restrict to __restrict in public includes 2012-01-09 21:44:51 +11:00
slab.c miscellaneous: clean up trailing whitespace once again 2013-04-07 18:05:01 +10:00
slab.h Increase slab name from 64 to 128 characters 2012-06-26 22:01:42 +10:00
sysinfo.c miscellaneous: clean up trailing whitespace once again 2013-04-07 18:05:01 +10:00
sysinfo.h Change restrict to __restrict in public includes 2012-01-09 21:44:51 +11:00
version.c miscellaneous: clean up trailing whitespace once again 2013-04-07 18:05:01 +10:00
version.h name change: procps -> procps-ng 2011-06-04 20:50:12 +02:00
wchan.h Change restrict to __restrict in public includes 2012-01-09 21:44:51 +11:00
whattime.c docs: clarification to license headers in files 2012-03-03 18:41:11 +11:00
whattime.h big header clean-up 2002-12-09 07:00:07 +00:00