In CheriBSD we exceed the 19 non-NULL arguments in the static array. Add
a simple size doubling allocator and increase the default to 32.
GC remnants of support for fixed arguments.
Differential D21971
rpcgen: make compiler arglist allocation dynamic brooks on Oct 10 2019, 4:36 PM. Authored by Tags None Referenced Files
Details In CheriBSD we exceed the 19 non-NULL arguments in the static array. Add GC remnants of support for fixed arguments. Survives a buildworld including some calls to rpcgen.
Diff Detail
Event TimelineComment Actions I wish the C standard library had some kind of dynamic array so that this is not reimplement in every program... I wonder if we could use something like the utarray.h macros from uthash? But for now this definitely looks good to me. Comment Actions We certainly could use utarray instead, though I'm not super convinced by its readability. (Importing uthash.h into contrib is on my todo list since I'd like to merge my changes to use it instead of bdb for hashes in init and a couple other places.) Comment Actions Sounds good. I agree that utarray is quite ugly (and inefficient) but we could still use it to avoid reimplementing dynamic vectors for non-performance-critical code duplication. I haven't looked if there are any alternatives, I only discovered it because we already use uthash.
Comment Actions
|