On Monday, September 21, 2015 at 1:44:07 PM UTC+5:30, Saúl Ibarra Corretgé wrote: > > On 09/21/2015 08:53, Devchandra Meetei wrote: > > Is this related to > > > > > http://blog.kazuhooku.com/2014/09/the-reasons-why-i-stopped-using-libuv.html > > > > Search for the > > "*Memory Usage is not Optimal*" > > > > I don't think so. All the memory libuv asked the user to allocate for a > stream would be freed by the user when the write callback hits, which is > always before uv_close gets called. > > > Cheers, > > -- > Saúl Ibarra Corretgé > bettercallsaghul.com > > I found my problem has roots in the way Windows 8 handles memory especially when using std::deque container, and it has to do nothing with the libuv. I disagree with the claims made in the link given above, especially with what is written under 'Memory Usage is not Optimal' If I want to send 64KB of data to 1000 connections I wouldn't allocate 1000 blocks as claimed there. Instead, single block and references to it is enough. In after_write when references becomes zero I would free the single block. Alternatively std::shared_ptr also can be used.
Tnx, Ashish -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
