$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [bind/function] memory allocation question
From: Tim Blechmann (tim_at_[hidden])
Date: 2009-09-24 09:04:01
hi all,
i would like to use boost.bind and boost.function in a real-time
application, where heap memory allocation is not allowed.
according to the docs, boost.function may allocate memory on the heap,
but uses a small object optimization, to avoid heap allocation.
i'd be curious, if there is a way to figure out, whether heap allocation
may occur or not ... i would like to be able to use boost::function
objects, initialized by boost::bind, something like:
void callme (int some, int args)
{}
boost::function<void (void)> fn = boost::bind(callme, 1, 2);
fn();
thanks, tim
-- tim_at_[hidden] http://tim.klingt.org Which is more musical, a truck passing by a factory or a truck passing by a music school? John Cage