Bug 192222

Summary: nitems for uma_zone_set_max in uma(9) not fully documented
Product: Documentation Reporter: Enji Cooper <ngie>
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: doc, felix.the.red, markj
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Enji Cooper freebsd_committer 2014-07-28 21:59:09 UTC
uma(9) provides a prototype for uma_zone_set_max , but doesn't mention what nitems, and (more importantly) doesn't mention the expected behavior for nitems, any bounds that should be checked/dealt with before passing them to the function, etc.
Comment 1 Enji Cooper freebsd_committer 2014-07-28 21:59:37 UTC
(In reply to yaneurabeya from comment #0)
> uma(9) provides a prototype for uma_zone_set_max , but doesn't mention what

mention what -> mention

> nitems, and (more importantly) doesn't mention the expected behavior for
> nitems, any bounds that should be checked/dealt with before passing them to
> the function, etc.
Comment 2 Enji Cooper freebsd_committer 2014-07-28 22:08:28 UTC
From uma.h...

 *      nitems  The requested upper limit on the number of items allowed
Comment 3 Enji Cooper freebsd_committer 2014-07-28 22:08:55 UTC
The return value is important too...

 * Returns:
 *      int  The effective value of nitems after rounding up based on page size
Comment 4 Felix Johnson freebsd_triage 2021-09-20 00:38:12 UTC
As of today, UMA(9) has a paragraph describing nitems as the upper limit for items that can be allocated to a zone. There is no bounds checking for this value.
I think this can be closed.