Sorry for all the confusion but I was very confused myself. Now the block_ptr<> works in all cases with Linux x86: - I removed the usage of an allocator. Now there is no need for any allocator anymore. - I removed the usage of the strange pointer proxy optimization. Now the memory manager might take more memory but the class is clean and correctly abstracted. - I removed the usage of weak references. This is just too error-prone. But I need to tell whether an address is on the stack or on the heap. There is no portable way to do this except from marking the heap boundaries by overloading an allocator or write assembly code for each architecture / OS. I prefer the latter and I think this should eventually be part of the standards. Once again the working examples are here: https://github.com/philippeb8/block_ptr/blob/master/example/benchmark.cpp https://github.com/philippeb8/block_ptr/blob/master/example/block_ptr_test1.... https://github.com/philippeb8/block_ptr/blob/master/example/block_ptr_test2.... Regards, -Phil