Boost logo

Boost Users :

Subject: Re: [Boost-users] (Newbie) Embedded programming, memory pools, and allocate_shared()
From: Steven Boswell II (ulatekh_at_[hidden])
Date: 2017-12-12 15:14:25


On Mon, Dec 12, 2017 at 7:42AM, Michael Powell via Boost-users <boost-users_at_[hidden]> wrote:
>I considered Boost.Asio once upon a time for one of my embedded
>projects a couple of years ago, but I couldn't get it to work quite
>right, so I decided to roll my own messaging framework.

Sadly, that's the direction I'll probably have to go.
Providing an allocator for pending socket operations involves having to provide the allocator in places where it's not feasible without forcing heavy changes on client code, e.g. asio_handler_allocate() and asio_handler_deallocate(). I can add a boost::asio::io_service<A> parameter to those 2 functions, but then they have to be templated too. Also, Boost::ASIO makes heavy use of typedefs that can't easily be made templated, not without requiring C++11's "using" feature.
It appears that Boost::ASIO won't work in an embedded context any time soon.
It's too bad -- my upcoming project is going to make heavy use of asynchronous I/O, circular-buffers, and lock-free queues, and I really didn't want to have to roll my own.I hate reinventing the wheel; I have enough to do as it is.
Thanks for your help.

-Steven



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net