lineedit: stop using permanent int_buf[] (16k!): allocate it
authorDenys Vlasenko <dvlasenk@redhat.com>
Fri, 3 Sep 2010 11:02:47 +0000 (13:02 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Fri, 3 Sep 2010 11:02:47 +0000 (13:02 +0200)
commit9b56bf541667ce1b4d408cd4e23bc51a44ae9267
treed2c39193240132d81b77446cbecee15a4c0c8af2
parent81254ed3875f7be81b98266866de7f990bcd06c8
lineedit: stop using permanent int_buf[] (16k!): allocate it

Now it is allocated temporarily only for the duretion of prefix generation,
and also we only allocate the needed size, not maximally possible.

function                                             old     new   delta
build_match_prefix                                   579     590     +11
remove_chunk                                          43      28     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 11/-15)             Total: -4 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
libbb/lineedit.c