mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Slab: Init node in slab head to NULLs.
This commit is contained in:
parent
ea259d6201
commit
59238768b3
@ -216,8 +216,11 @@ sl_new_head(slab *s)
|
|||||||
struct sl_obj *no;
|
struct sl_obj *no;
|
||||||
uint n = s->objs_per_slab;
|
uint n = s->objs_per_slab;
|
||||||
|
|
||||||
h->first_free = o;
|
*h = (struct sl_head) {
|
||||||
h->num_full = 0;
|
.first_free = o,
|
||||||
|
.num_full = 0,
|
||||||
|
};
|
||||||
|
|
||||||
while (n--)
|
while (n--)
|
||||||
{
|
{
|
||||||
o->slab = h;
|
o->slab = h;
|
||||||
|
Loading…
Reference in New Issue
Block a user