https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65122

--- Comment #25 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Oct 14 12:03:47 2016
New Revision: 241158

URL: https://gcc.gnu.org/viewcvs?rev=241158&root=gcc&view=rev
Log:
PR65122 extended alignment support in allocators

        PR libstdc++/65122
        * include/ext/malloc_allocator.h (malloc_allocator::allocate): Use
        aligned_alloc for types with extended alignment if available,
        otherwise throw bad_alloc if malloc doesn't return a suitable value.
        * include/ext/bitmap_allocator.h (bitmap_allocator::allocate)
        (bitmap_allocator::deallocate): Use aligned new/delete for types with
        extended alignment.
        * include/ext/mt_allocator.h (__mt_alloc::allocate)
        (__mt_alloc::deallocate): Likewise.
        * include/ext/new_allocator.h (new_allocator::allocate)
        (new_allocator::deallocate): Likewise.
        * include/ext/pool_allocator.h (__pool_alloc::allocate)
        (__pool_alloc::deallocate): Likewise.
        * testsuite/20_util/allocator/overaligned.cc: New test.
        * testsuite/ext/bitmap_allocator/overaligned.cc: New test.
        * testsuite/ext/malloc_allocator/overaligned.cc: New test.
        * testsuite/ext/mt_allocator/overaligned.cc: New test.
        * testsuite/ext/new_allocator/overaligned.cc: New test.
        * testsuite/ext/pool_allocator/overaligned.cc: New test.

Added:
    trunk/libstdc++-v3/testsuite/20_util/allocator/overaligned.cc
    trunk/libstdc++-v3/testsuite/ext/bitmap_allocator/overaligned.cc
    trunk/libstdc++-v3/testsuite/ext/malloc_allocator/overaligned.cc
    trunk/libstdc++-v3/testsuite/ext/mt_allocator/overaligned.cc
    trunk/libstdc++-v3/testsuite/ext/new_allocator/overaligned.cc
    trunk/libstdc++-v3/testsuite/ext/pool_allocator/overaligned.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/ext/bitmap_allocator.h
    trunk/libstdc++-v3/include/ext/malloc_allocator.h
    trunk/libstdc++-v3/include/ext/mt_allocator.h
    trunk/libstdc++-v3/include/ext/new_allocator.h
    trunk/libstdc++-v3/include/ext/pool_allocator.h

Reply via email to