Is there an easy way to calculate the minimum and maximum memory overhead required by a single instance of boost::function? It's not easy to trace through the code and find all instances of allocations / deallocations and member variables. sizeof(boost::function<T>) appears to be 32 on my machine for all values of T but I'm not sure if there are certain types of functions which might be less than this or more than this. Is there any way to reduce the memory overhead of boost::function? 32 is quite a bit on an x86 architecture, considering a normal function pointer on the same machine takes only 4 bytes. I was thinking of using boost::function<> as the basis for a generic inter-object messaging system where there may be thousands of objects in the systems any of which might want to communicate via event sinks / sources implemented via boost::function<> and callback registration. But if the memory overhead is 32-bytes per object at a minimum, and possibly more with more complicated function objects or on 64-bit architectures, then it seems like it could quickly grow out of hand if there were many listeners.