$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Korcan Hussein (korcan_h_at_[hidden])
Date: 2005-03-16 21:17:56
shared_ptr causes an infinite recursion when used in the redefinition of
global operators new/delete. This is caused by sp_counted_base_impl being
allocated on the heap via global operators new/delete.
There currently are alternative allocation schemes which clients can select
via macros but all current schemes (eventually) explicitly invoke global
operators new/delete to de/allocate memory.
The proposed patch Ive included just adds another choice of allocation
scheme to sp_counted_base_impl with the existing ones by doing exactly the
same method. It forwards de/allocation requests to C memory functions
std::malloc and std::free. Clients of shared_ptr may select the alternative
allocation scheme by defining the macro BOOST_SP_USE_MALLOC_ALLOCATOR before
inclusion of shared_ptr/smart_ptr.hpp.
>From Korcan Hussein.