Hi,

To summarize, the number of fds is limited to the size of the table,
256 elements at most, this is an estimate from Microsoft that is
enough!
Solution, as pointed out Tim, is to buffer more data in a single
request. It's like nagle algorithm that I will implement, but I think
it is not a good solution in my case.
Firstly, there's several threads that send CAN frames in accordance
with specific conditions... and I should never delay the emission of
any frame. Secondly, A CAN frame has a small size !
What is the better solution ?

Regards,
Mohamed


On Tue, Dec 11, 2012 at 6:30 AM, Orin Eman <orin.e...@gmail.com> wrote:
>
> On Mon, Dec 10, 2012 at 5:23 PM, Peter Stuge <pe...@stuge.se> wrote:
>>
>> Peter Stuge wrote:
>> > Are there considerations (timing? something else?)
>> > related to asking Windows for memory as needed
>>
>> Pete Batard wrote:
>> > Adding and testing array reallocation code is a PITA
>> > and development time is always super-limited
>
>
>
> Ah, the luxuries of C++ :)
>
> #include <vector>
>
> Orin,
> hasn't written array reallocation code in years.
>
> OK, so it's not that hard...
>
> size_t newsize = (oldsize * 3)/2; /* 0.5 of old size is _a_ generally 
> accepted increment; not saying it's the best in this case */
> whatever *newarray = (whatever *)malloc(newsize*sizeof(whatever));
> memcpy(newarray, oldarray, oldsize*sizeof(whatever));
> whatever *temp = oldarray;
> oldarray = newarray;
> oldsize = newsize;
> free(temp);
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
>

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to