Re: [RFC][PATCH] flexible array implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2009-07-21 at 18:57 +0200, Denys Vlasenko wrote:
> On Tue, Jul 21, 2009 at 6:03 PM, Dave Hansen<dave@xxxxxxxxxxxxxxxxxx> wrote:
> > +static inline struct flex_array_part *
> > +__fa_get_part(struct flex_array *fa, int part_nr, gfp_t flags)
> > +{
> > +       struct flex_array_part *part = NULL;
> > +       if (part_nr > __nr_part_ptrs())
> > +               return NULL;
> > +       part = fa->parts[part_nr];
> > +       if (!part) {
> > +               part = kmalloc(FLEX_ARRAY_PART_SIZE, flags);
> > +               if (!part)
> > +                       return NULL;
> > +               fa->parts[part_nr] = part;
> > +       }
> > +       return part;
> > +}
> 
> This is far too big to be an inline.

Yeah, I guess I should just leave it to the compiler to inline it since
it's only used in one place.

-- Dave

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux