Improving kernel string handling
lwn.net
lwn.net
Example code using a pool allocator I wrote about 15 years ago: http://git.annexia.org/?p=rws.git;a=blob;f=process_rq.c;h=a0...
Pools can also have parent/child relations, so when a parent pool is freed, all child pools are freed.
Why does `strscpy_truncate(dst,src,count)` exist at all ? it seem like a generic buffer/array `take(dst,src,count)`. And how problematic would be to use a compiled regex to parse "major:minor", or proper logic by seeking for ':' and read before after that point.