zone.9 (acff84fb0e498f5e0a9e990a3893c85ec1c5be0c) zone.9 (382682b2a4c79d66e2e504a99e60ef3bbc20fe4a)
1.\"-
2.\" Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd January 27, 2001
29.Dt ZONE 9
30.Os
31.Sh NAME
1.\"-
2.\" Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd January 27, 2001
29.Dt ZONE 9
30.Os
31.Sh NAME
32.Nm uma_zcreate ,
32.Nm uma_zalloc ,
33.Nm uma_zfree ,
34.Nm uma_zdestroy
35.Nd zone allocator
36.Sh SYNOPSIS
37.In sys/param.h
38.In sys/queue.h
39.In vm/uma.h
33.Nm uma_zalloc ,
34.Nm uma_zfree ,
35.Nm uma_zdestroy
36.Nd zone allocator
37.Sh SYNOPSIS
38.In sys/param.h
39.In sys/queue.h
40.In vm/uma.h
41.Ft uma_zone_t
42.Fn uma_zcreate "char *name" "int size" "uma_ctor ctor" "uma_dtor dtor" "uma_in
43it uminit" "uma_fini fini" "int align" "u_int16_t flags"
40.Ft void *
41.Fn uma_zalloc "uma_zone_t zone, int flags"
42.Ft void
43.Fn uma_zfree "uma_zone_t zone" "void *item"
44.Ft void
45.Fn uma_zdestroy "uma_zone_t zone"
46.Sh DESCRIPTION
47The zone allocator provides an efficient interface for managing

--- 24 unchanged lines hidden (view full) ---

72.Pp
73Alternatively they should assume those entries corrupted
74after each allocation.
75After the first allocation of an item,
76it will have been cleared to zeroes, however subsequent allocations
77will retain the contents as of the last free, with the exception of the
78fields mentioned above.
79.Pp
44.Ft void *
45.Fn uma_zalloc "uma_zone_t zone, int flags"
46.Ft void
47.Fn uma_zfree "uma_zone_t zone" "void *item"
48.Ft void
49.Fn uma_zdestroy "uma_zone_t zone"
50.Sh DESCRIPTION
51The zone allocator provides an efficient interface for managing

--- 24 unchanged lines hidden (view full) ---

76.Pp
77Alternatively they should assume those entries corrupted
78after each allocation.
79After the first allocation of an item,
80it will have been cleared to zeroes, however subsequent allocations
81will retain the contents as of the last free, with the exception of the
82fields mentioned above.
83.Pp
84The
85.Fn uma_zcreate
86function creates a new zone from which items may then be allocated from.
87The
88.Fa name
89argument is a text name of the zone for debugging and stats; this memory
90should not be freed until the zone has been deallocated.
91.Pp
80To allocate an item from a zone, simply call
81.Fn uma_zalloc
82with a pointer to that zone
83and set the
84.Fa flags
85argument to selected flags as documented in
86.Xr malloc 9 .
87It will return a pointer to an item if successful,

--- 51 unchanged lines hidden ---
92To allocate an item from a zone, simply call
93.Fn uma_zalloc
94with a pointer to that zone
95and set the
96.Fa flags
97argument to selected flags as documented in
98.Xr malloc 9 .
99It will return a pointer to an item if successful,

--- 51 unchanged lines hidden ---