[PATCH v2] lib/slab: introduce sl_allocz() function and use it in Babel

Andreas Rammhold andreas at rammhold.de
Mon Nov 23 11:47:58 CET 2020


On 11:33 23.11.20, Toke Høiland-Jørgensen wrote:
> Andreas Rammhold <andreas at rammhold.de> writes:
> 
> > On 11:07 23.11.20, Toke Høiland-Jørgensen wrote:
> >> +void *
> >> +sl_allocz(slab *s)
> >> +{
> >> +  void *obj = sl_alloc(s);
> >> +  memset(obj, 0, s->size);
> >> +  return obj;
> >> +}
> >> +
> >
> > This is the same function name and (almost same) implementation as
> > further down in this patch. Did you forget to remove it?
> 
> No, look at the ifdefs - this one is for the FAKE_SLAB case :)

Ok, I got confused by the mail highlighting. In a proper editor it is
more obvious.


andi-


More information about the Bird-users mailing list