Opened 4 years ago

Last modified 4 years ago

#13575 new Bugs

boost asio memory leak

Reported by: boris@… Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.67.0 Severity: Problem
Keywords: Cc:

Description

This code on heavily loaded server leads to memory leak inside kqueue_reactor::allocate_descriptor_state():

boost::asio::ip::udp::socket s(io_service);
s.open(boost::asio::ip::udp::v4());
s.bind(boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), 0));

While this code doesn't lead to this leak:

boost::asio::ip::udp::socket s(io_service, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), 0));

Tested on MacOS.

Change History (1)

comment:1 by boris@…, 4 years ago

io_service is created with concurrency 1, if that matters:

boost::asio::io_service io_service(1);

Note: See TracTickets for help on using tickets.