Remove long untrue note about storing state information inside free items.
OKed by: rwatson, tegge Approved by: pjd (mentor) MFC after: 1 week
This commit is contained in:
parent
aa82c72808
commit
ff66a30202
@ -65,27 +65,9 @@ The zone allocator keeps track of which items are in use and which
|
||||
are not, and provides functions for allocating items from the zone and
|
||||
for releasing them back (which makes them available for later use).
|
||||
.Pp
|
||||
The zone allocator stores state information inside the items proper
|
||||
while they are not allocated,
|
||||
so structures that will be managed by the zone allocator
|
||||
and wish to use the type stable property of zones by leaving some fields
|
||||
pre-filled between allocations, must reserve
|
||||
two pointers at the very beginning for internal use by the zone
|
||||
allocator, as follows:
|
||||
.Bd -literal -offset indent
|
||||
struct my_item {
|
||||
struct my_item *z_rsvd1;
|
||||
struct my_item *z_rsvd2;
|
||||
/* rest of structure */
|
||||
};
|
||||
.Ed
|
||||
.Pp
|
||||
Alternatively they should assume those entries corrupted
|
||||
after each allocation.
|
||||
After the first allocation of an item,
|
||||
it will have been cleared to zeroes, however subsequent allocations
|
||||
will retain the contents as of the last free, with the exception of the
|
||||
fields mentioned above.
|
||||
will retain the contents as of the last free.
|
||||
.Pp
|
||||
The
|
||||
.Fn uma_zcreate
|
||||
|
Loading…
x
Reference in New Issue
Block a user