Jonathan Wakely f50f2efae9 libstdc++: Prefer posix_memalign for aligned-new [PR113258]
As described in PR libstdc++/113258 there are old versions of tcmalloc
which replace malloc and related APIs, but do not repalce aligned_alloc
because it didn't exist at the time they were released. This means that
when operator new(size_t, align_val_t) uses aligned_alloc to obtain
memory, it comes from libc's aligned_alloc not from tcmalloc. But when
operator delete(void*, size_t, align_val_t) uses free to deallocate the
memory, that goes to tcmalloc's replacement version of free, which
doesn't know how to free it.

If we give preference to the older posix_memalign instead of
aligned_alloc then we're more likely to use a function that will be
compatible with the replacement version of free. Because posix_memalign
has been around for longer, it's more likely that old third-party malloc
replacements will also replace posix_memalign alongside malloc and free.

libstdc++-v3/ChangeLog:

	PR libstdc++/113258
	* libsupc++/new_opa.cc: Prefer to use posix_memalign if
	available.
2024-01-11 17:35:57 +00:00
2024-01-03 12:19:35 +01:00
2023-11-23 00:18:14 +00:00
2024-01-11 10:51:11 -05:00
2024-01-10 00:18:30 +00:00
2024-01-03 12:19:35 +01:00
2024-01-03 12:19:35 +01:00
2024-01-05 08:54:28 +01:00
2024-01-10 00:18:30 +00:00
2024-01-05 00:18:48 +00:00
2024-01-03 12:19:35 +01:00
2024-01-03 12:19:35 +01:00
2024-01-08 00:16:43 +00:00
2024-01-06 00:18:04 +00:00
2024-01-11 00:18:50 +00:00
2024-01-09 00:17:50 +00:00
2024-01-03 12:19:35 +01:00
2024-01-04 00:18:45 +00:00
2024-01-03 12:19:35 +01:00
2024-01-05 08:54:28 +01:00
2024-01-04 00:18:45 +00:00
2024-01-03 00:17:41 +00:00
2024-01-03 12:19:35 +01:00
2024-01-03 12:19:35 +01:00
2024-01-03 12:19:35 +01:00
2023-11-14 12:23:39 +00:00
2023-11-14 00:47:11 +01:00
2024-01-10 00:18:30 +00:00
2024-01-09 08:02:31 -07:00
2024-01-09 08:02:31 -07:00
2024-01-09 08:02:31 -07:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.8%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.3%