Re: [PATCH 4/9] usb-core: Free bulk streams on interface release

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

 



On Fri, 4 Oct 2013, Hans de Goede wrote:

> >> +	struct usb_host_endpoint *ep, *eps[USB_MAXENDPOINTS];
> >
> > That's a big array to put on the stack: 30 entries each containing 8
> > bytes (on a 64-bit arch).
> 
> I was wondering about this myself when I wrote this. What do you suggest
> as an alternative, kmalloc an array with intf->cur_altsetting->desc.bNumEndpoints
> pointers ?

Or simply do 30 pointers every time.  240 bytes isn't all that much for
kmalloc.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux