init: don't use fixed size buffer for command
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 16 Aug 2013 09:48:48 +0000 (11:48 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 16 Aug 2013 09:48:48 +0000 (11:48 +0200)
commitd2e07bc16cbd68bc2771f9f163e610e4e327c67c
tree737d5309821fd44427754223965ec596bfa1fcf8
parent73fbe9dc86df6c7db425c2c3939ff98c8c44974e
init: don't use fixed size buffer for command

We store init actions forever. 256 bytes per action means that
a typical inittab of ~10 commands uses 2.5k just to remember
command strings - which are usually _much_ shorter than 256 bytes.

At a cost of a bit more code, it's possible to allocate
only actually needed amount.

function                                             old     new   delta
init_exec                                            224     248     +24
new_init_action                                      140     142      +2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
init/init.c