fast modutils
Denys Vlasenko
vda.linux at googlemail.com
Sun Sep 14 23:33:20 UTC 2008
On Saturday 13 September 2008 22:09, dronnikov at gmail.com wrote:
> The replacement to modprobe-small.
> I explained the changes in "modprobe patches" mailing list thread an hour ago.
> "speeds" contains profiling info for the 3 flavors: fast, small and Timo s.
> A typical speedup is of up to 10 times.
>
> Please, comment and consider applying.
+ size_t len;
...
+ // goto next module definition
+ for (int i = 3; --i >= 0; ) {
+ ptr += len;
+ len = *((unsigned *)ptr);
+ ptr += sizeof(len);
+ }
sizeof(size_t) may be != 4. sizeof(unsigned) also may be != 4.
Also, this may perform illegal unaligned accesses.
+ write(STDOUT_FILENO, &stringbuf_idx, 4);
This is wrong for the same reasons.
--
vda
More information about the busybox
mailing list