malloc_allocator.h: Fixed the construct function to call global placement new instead...
authorDhruv Matani <dhruvbird@gmx.net>
Wed, 24 Mar 2004 21:40:01 +0000 (21:40 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 24 Mar 2004 21:40:01 +0000 (21:40 +0000)
commit58c959212f4871518e4d0d5af8555759cd0cf7a9
tree0d0ec11fccc6f462f017f07a58957ab4728af127
parent8367b9c1e9097b487ce56448daec7dfbcc1f09cf
malloc_allocator.h: Fixed the construct function to call global placement new instead of assignment.

2004-03-24  Dhruv Matani  <dhruvbird@gmx.net>

* ext/malloc_allocator.h: Fixed the construct function to call
global placement new instead of assignment. Added a check after
the return from malloc to check whether returned pointer is NULL,
and if so, throw std::bad_alloc().
* ext/debug_allocator.h: Added a check in the deallocate function
to check whether the user has passed a NULL pointer or not.

From-SVN: r79934
libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/debug_allocator.h
libstdc++-v3/include/ext/malloc_allocator.h