[Client-dev] Re: [Common-dev] CR: sock option for enabling read buffer reallocation to save memory

[Client-dev] Re: [Common-dev] CR: sock option for enabling read buffer reallocation to save memory

Liam Murray liamm at real.com
Thu Aug 5 11:30:05 PDT 2004


Both have benefits and costs. As Aaron said, the cost of a copy was worth 
the memory savings on Symbian. For other applications/platforms this 
may/will not be the case. We can try FIONREAD and I think we should since 
it is not too difficult, but nevertheless I think the option to copy is 
still useful. Note that the default behavior is the same as it has been -- 
allocate a buffer once and merely update the size associated with it (no 
reallocation occurs).

I'd also like to add another option (HX_SOCKOPT_MAXUDP) so applications 
that have a defined max UDP packet size can specify that size for 
allocating the read buffer (in which case they presumably would leave the 
default  no-reallocate-to-size option set).

Liam


At 11:12 AM 8/5/2004, Tom Marshall wrote:
>I agree that both wasting memory with 64k buffers and wasting CPU with
>memcpy are undesirable.  I would really like to see if FIONREAD is a viable
>solution.  Can we test it out to see if it works?
>
>--
>Logic is a systematic method of coming to the wrong conclusion with
>confidence.
>
>_______________________________________________
>Common-dev mailing list
>Common-dev at lists.helixcommunity.org
>http://lists.helixcommunity.org/mailman/listinfo/common-dev




More information about the Common-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.