[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: rewriting config_*, xmalloc_fget*
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2011-06-18 7:39:31
Message-ID: 201106180939.31999.vda.linux () googlemail ! com
[Download RAW message or body]
On Friday 17 June 2011 10:58, Timo Teräs wrote:
> >> bb_get_chunk_with_continuation() is used only by config parser,
> >> and config parser definitely has no need to deal with \0.
> >> Meaning: it needs to not segfault or hand on files with \0,
> >> but other than this, it is free to either ignore \0, or replace
> >> then with space or newline. IOW: whoever has \0 in their *config*
> >> files is shooting himself in the foot.
> >>
> >> The first step would be to unmarry these two functions.
> >
> > Done in this commit:
> >
> > http://git.busybox.net/busybox/commit/?id=a1a448347e71c9899ad1500cbd8739fd82e1bb91
>
> Did you run the checks if anything broke?
Yes
> > bb_get_chunk_with_continuation -> get_line_with_continuation,
> > become static in parse_config.c,
> > lost one parameter and one realloc per line.
> >
> > Since now it is nicely localized to parse_config.c, we can optimize it for speed
> > further. For example, we can avoid realloc per each line by reusing the same
> > buffer.
>
> Goody. config_* is fairly isolated now, and can be updated separately.
> I'll try to take the time to optimise this during this weekend.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic