$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Bob Marinier (rmarinie_at_[hidden])
Date: 2008-08-30 21:00:18
I'm using Visual Studio 2005 SP1.  If I compile a debug build with 
"#define _CRTDBG_MAP_ALLOC" (which is used to help track down memory 
leaks), then I get a lot of error messages from boost::pool (e.g., any 
of the example snippets in the documentation).  The errors are shown 
below.  It appears that with that symbol defined, several macros get 
defined in crtdbg.h, including the following:
#define   malloc(s)             _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, 
__LINE__)
#define   free(p)               _free_dbg(p, _NORMAL_BLOCK)
...which I suspect is the source of the problem.
Is this a pool bug, or is there something I'm supposed to #define to 
make this work?
Thanks,
Bob Marinier
1>c:\program 
files\boost\boost_1_35_0\boost\pool\simple_segregated_storage.hpp(99) : 
warning C4003: not enough actual parameters for macro 'malloc'
1>c:\program 
files\boost\boost_1_35_0\boost\pool\simple_segregated_storage.hpp(99) : 
error C2059: syntax error : ','
1>        c:\program 
files\boost\boost_1_35_0\boost\pool\simple_segregated_storage.hpp(161) : 
see reference to class template instantiation 
'boost::simple_segregated_storage<SizeType>' being compiled
1>c:\program 
files\boost\boost_1_35_0\boost\pool\simple_segregated_storage.hpp(111) : 
error C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(54) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(56) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(65) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(67) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(219) : warning 
C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(223) : warning 
C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(231) : warning 
C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(251) : warning 
C4002: too many actual parameters for macro 'free'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(219) : error 
C2059: syntax error : ','
1>        c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(278) : 
see reference to class template instantiation 
'boost::pool<UserAllocator>' being compiled
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(241) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(251) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(252) : error 
C2535: 'void boost::pool<UserAllocator>::_free_dbg(void *const )' : 
member function already defined or declared
1>        c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(241) : 
see declaration of 'boost::pool<UserAllocator>::_free_dbg'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(451) : warning 
C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(500) : warning 
C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(55) 
: warning C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(59) 
: warning C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(91) 
: warning C4002: too many actual parameters for macro 'free'
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(95) 
: warning C4002: too many actual parameters for macro 'free'
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(55) 
: error C2059: syntax error : ','
1>        c:\program 
files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(115) : see 
reference to class template instantiation 
'boost::singleton_pool<Tag,RequestedSize,UserAllocator,Mutex,NextSize>' 
being compiled
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(79) 
: error C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(91) 
: error C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(92) 
: error C2535: 'void 
boost::singleton_pool<Tag,RequestedSize,UserAllocator,Mutex,NextSize>::_free_dbg(void 
*const )' : member function already defined or declared
1>        c:\program 
files\boost\boost_1_35_0\boost\pool\singleton_pool.hpp(79) : see 
declaration of 
'boost::singleton_pool<Tag,RequestedSize,UserAllocator,Mutex,NextSize>::_free_dbg'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool_alloc.hpp(180) : 
warning C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool_alloc.hpp(194) : 
warning C4003: not enough actual parameters for macro 'malloc'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool_alloc.hpp(210) : 
warning C4002: too many actual parameters for macro 'free'
1>c:\program 
files\boost\boost_1_35_0\boost\pool\simple_segregated_storage.hpp(99) : 
error C2059: syntax error : ','
1>        c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(134) : 
see reference to class template instantiation 
'boost::simple_segregated_storage<SizeType>' being compiled
1>        with
1>        [
1>            SizeType=boost::default_user_allocator_new_delete::size_type
1>        ]
1>        c:\program 
files\boost\boost_1_35_0\boost\pool\pool_alloc.hpp(50) : see reference 
to class template instantiation 'boost::pool<UserAllocator>' being compiled
1>        with
1>        [
1>            UserAllocator=boost::default_user_allocator_new_delete
1>        ]
1>        c:\program files\microsoft visual studio 
8\vc\include\vector(416) : see reference to class template instantiation 
'boost::pool_allocator<T>' being compiled
1>        with
1>        [
1>            T=soarxml::xmlString
1>        ]
1>        c:\program files\microsoft visual studio 
8\vc\include\vector(426) : see reference to class template instantiation 
'std::_Vector_val<_Ty,_Alloc>' being compiled
1>        with
1>        [
1>            _Ty=soarxml::xmlString ,
1>            _Alloc=boost::pool_allocator<soarxml::xmlString>
1>        ]
1>        
c:\bob\soar-dev\soarsuite\core\elementxml\include\elementxmlimpl.h(69) : 
see reference to class template instantiation 'std::vector<_Ty,_Ax>' 
being compiled
1>        with
1>        [
1>            _Ty=soarxml::xmlString,
1>            _Ax=boost::pool_allocator<soarxml::xmlString>
1>        ]
1>c:\program 
files\boost\boost_1_35_0\boost\pool\simple_segregated_storage.hpp(111) : 
error C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(219) : error 
C2059: syntax error : ','
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(241) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(251) : error 
C2059: syntax error : 'constant'
1>c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(252) : error 
C2535: 'void boost::pool<UserAllocator>::_free_dbg(void *const )' : 
member function already defined or declared
1>        with
1>        [
1>            UserAllocator=boost::default_user_allocator_new_delete
1>        ]
1>        c:\program files\boost\boost_1_35_0\boost\pool\pool.hpp(241) : 
see declaration of 'boost::pool<UserAllocator>::_free_dbg'
1>        with
1>        [
1>            UserAllocator=boost::default_user_allocator_new_delete
1>        ]