[pool] conflict with _CRTDBG_MAP_ALLOC on VS 2005
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
participants (1)
-
Bob Marinier