musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/linux/sysinfo.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014年04月15日 13:30:20 -0400
committerRich Felker <dalias@aerifal.cx>2014年04月15日 13:30:20 -0400
commit233767b48a083f526557ee39aa1c773efa345972 (patch)
treeedee31b5097d4a1dc594975e5e82cf903d9083e3 /src/linux/sysinfo.c
parent805698401dbac7ce3079fa97eaad5ba0508377f4 (diff)
downloadmusl-233767b48a083f526557ee39aa1c773efa345972.tar.gz
avoid linear-time if/else special cases in sysconf
the previous handling of cases that could not fit in the 16-bit table or which required non-constant results was extremely ugly and could not scale. the new code remaps these keys into a contiguous range that's efficient for a switch statement.
Diffstat (limited to 'src/linux/sysinfo.c')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月08日 05:34:45 +0000

AltStyle によって変換されたページ (->オリジナル) /