]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/testsuite/ext/malloc_allocator/check_allocate_max_size.cc
bitmap_allocator.h (allocate): Throw std::bad_alloc when n > max_size().
authorPaolo Carlini <pcarlini@suse.de>
Thu, 21 Oct 2004 00:06:02 +0000 (00:06 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 21 Oct 2004 00:06:02 +0000 (00:06 +0000)
commita063e891bd88967d9dcea0f8c163f8372116265f
tree86541239e0f24c6b8ccdb784b4212770c4b0f617
parentf644cebf003c3dade9b0b583facc5c8d50a025f3
bitmap_allocator.h (allocate): Throw std::bad_alloc when n > max_size().

2004-10-20  Paolo Carlini  <pcarlini@suse.de>

* include/ext/bitmap_allocator.h (allocate): Throw std::bad_alloc
when n > max_size().
* include/ext/malloc_allocator.h (allocate): Likewise.
* include/ext/mt_allocator.h (allocate): Likewise.
* include/ext/new_allocator.h (allocate): Likewise.
* include/ext/array_allocator.h: Use __throw_bad_alloc().
* include/ext/pool_allocator.h: Use __builtin_expect.
* testsuite/ext/array_allocator/check_allocate_max_size.cc: New.
* testsuite/ext/bitmap_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/malloc_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/mt_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/new_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/ext/pool_allocator/check_allocate_max_size.cc: Likewise.
* testsuite/testsuite_allocator.h (check_allocate_max_size): New test.

From-SVN: r89351
14 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/array_allocator.h
libstdc++-v3/include/ext/bitmap_allocator.h
libstdc++-v3/include/ext/malloc_allocator.h
libstdc++-v3/include/ext/mt_allocator.h
libstdc++-v3/include/ext/new_allocator.h
libstdc++-v3/include/ext/pool_allocator.h
libstdc++-v3/testsuite/ext/array_allocator/check_allocate_max_size.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/bitmap_allocator/check_allocate_max_size.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/malloc_allocator/check_allocate_max_size.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/mt_allocator/check_allocate_max_size.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/new_allocator/check_allocate_max_size.cc [new file with mode: 0644]
libstdc++-v3/testsuite/ext/pool_allocator/check_allocate_max_size.cc [new file with mode: 0644]
libstdc++-v3/testsuite/testsuite_allocator.h