Page MenuHomeFreeBSD

Fix a bug with duplicate sysctl names.
ClosedPublic

Authored by jeff on Dec 3 2019, 9:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 3:14 AM
Unknown Object (File)
Nov 13 2023, 8:54 AM
Unknown Object (File)
Nov 12 2023, 6:08 PM
Unknown Object (File)
Nov 11 2023, 8:55 AM
Unknown Object (File)
Nov 10 2023, 3:23 AM
Unknown Object (File)
Oct 10 2023, 7:54 AM
Unknown Object (File)
Oct 8 2023, 2:03 AM
Unknown Object (File)
Aug 16 2023, 10:49 AM
Subscribers

Details

Summary

Use one greater than the highest observe count. This may inflate the numbers but it will not have duplicates. If you create 4bn zones ordered to inflate the numbers you can deal with the sysctl warnings.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jeff added reviewers: markj, pho, rlibby.
rlibby added inline comments.
sys/vm/uma_core.c
1895–1899 ↗(On Diff #65180)

An alternative might be to make use of snprintf(NULL, 0, fmt, ...); to count. (Or, maybe we ought to provide int asprintf(char **p, struct malloc_type *, const char *fmt, ...).)

This revision is now accepted and ready to land.Dec 3 2019, 11:43 PM