Re: [Boost-bugs] [Boost C++ Libraries] #7838: Exposing hander sizes of each call as constants.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7838: Exposing hander sizes of each call as constants.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-29 20:13:25


#7838: Exposing hander sizes of each call as constants.
-----------------------------------------+----------------------------------
  Reporter: rafael_gago_81@… | Owner: chris_kohlhoff
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.52.0 | Severity: Cosmetic
Resolution: | Keywords:
-----------------------------------------+----------------------------------

Comment (by anonymous):

 Hello!

 This feature request is related to the CustomHandler? api.

 As the internal handler storage size is fixed for each async api call (I
 think...), would it be possible to add constants that inform about the
 maximum size requirements of each async call?

 That would ease the implementation of segregated storage pools storing
 custom handlers, making it more suitable for realtime use.

 For example, in x86 linux I found that an "async_wait" constantly takes 40
 bytes, an "async_receive_from" 72, and an "async_send_to" 92.

 What I'm doing now is "fake calls" in initialization time, retreiving the
 requested sizes through a CustomHandler that traces the sizes, and then
 initializing the segregated storage pools with the results.

 That could easily be avoided exposing the size constants in some way.

 The current custom handler API wouldn't need to change.

 I must say that it was very wise to add the block size to the deallocation
 call, it eased things a lot, it allowed me to write safety code to forward
 the allocation/deallocation calls to the heap in case that the size
 requested wasn't the one.

 Best regards! Rafa.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7838#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC