]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r280495:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 21 May 2015 06:30:44 +0000 (06:30 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 21 May 2015 06:30:44 +0000 (06:30 +0000)
commitd579853c5362d845455d6b2bcf8a4f8bdf4b6186
treeacd66e168b16d83cdcb639c8c9695453b38ed01f
parent50c0dcb98fcff61a2aca39952d7f0a3847a253ce
MFC r280495:
Implement a simple OID number garbage collector. Given the increasing
number of dynamically created and destroyed SYSCTLs during runtime it
is very likely that the current new OID number limit of 0x7fffffff can
be reached. Especially if dynamic OID creation and destruction results
from automatic tests. Additional changes:

- Optimize the typical use case by decrementing the next automatic OID
sequence number instead of incrementing it. This saves searching time
when inserting new OIDs into a fresh parent OID node.

- Add simple check for duplicate non-automatic OID numbers.

git-svn-id: svn://svn.freebsd.org/base/stable/10@283171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_sysctl.c