Bug 192222 - nitems for uma_zone_set_max in uma(9) not fully documented
Summary: nitems for uma_zone_set_max in uma(9) not fully documented
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-28 21:59 UTC by Enji Cooper
Modified: 2021-09-21 15:26 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.