Porting 4.x code to 5.x: zfreei, zinit, struct vm_zone

Craig Rodrigues rodrigc at crodrigues.org
Wed Aug 13 21:07:31 PDT 2003


On Mon, Aug 11, 2003 at 08:23:56PM +0000, Bosko Milekic wrote:
>   Take a look at zone(9) in -current.  It has been updated, more or
>   less.  Otherwise, glance at src/sys/vm/uma.h, which is decently
>   documented for what concerns exported API.

Thanks for this pointer.  This API is not too difficult, but it
will require some work to port things.  Sam Leffler also pointed
me to sys/opencrypto/crypto.c, which makes good use of this API.

For the zone(9) man page, for the uma_zcreate() function,
it is not clear what the valid values of "flags" are.

The only place where flags is mentioned is with respect to
uma_zalloc: "the flags argument to selected flags as documented
     in malloc(9)."

However, the flags argument in uma_zcreate() does not take
the flags as documented in malloc(9).  Would it be useful to
update zone(9) with either:
  - text that says, go see the flags in <vm/uma.h>
  - document the actual uma_zcreate flags

The documentation in <vm/uma.h> is actually good enough, IMHO,
but referencing it in the man page would be nice.

-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc at crodrigues.org


More information about the freebsd-current mailing list