Eduard Voronkin
1c4b609216
Merge fd5ab9f1f3
into e2d7c24c73
2025-05-07 06:52:38 +00:00
Daan
cf8277f4e8
Merge pull request #918 from mneumann/dev-fix-build-on-dragonflybsd
...
Fix build on FreeBSD-derivate DragonFly
2024-12-30 12:18:35 -08:00
Eduard Voronkin
fd5ab9f1f3
fix new/delete overrides
...
apparently, even if MI_USE_CXX is OFF, mimalloc still provides mangled definitions of new/delete operators. It causes inability to statically link mimaloc in our scenario, since we want to have our own overrides of new/delete functions.
2024-11-06 12:02:22 -08:00
Philip Brown
f38816d4ed
Musl needs __libc* functions too
2024-10-06 15:42:46 -05:00
Michael Neumann
9c9efc417d
Fix build on FreeBSD-derivate DragonFly
2024-07-26 12:11:21 +02:00
Daan
e5267a31b0
only override strdup/strndup if those are not macros (issue #885 )
2024-05-10 17:03:42 -07:00
Daan
f7df734c6f
add further C++ delete signatures to override from C (issue #863 )
2024-04-19 13:44:29 -07:00
Daan
9830c0db42
redefine mi_nothrow_t to be a pointer to (probably) fix issue #840 to match WASI signatures
2024-04-19 13:31:31 -07:00
Daan
bb1fafa1bb
forward strdup/strndup to avoid leaks on macOS -- addresses PR #769
2024-04-19 10:34:04 -07:00
Joshua Root
f508ae5528
Only interpose strndup if it exists
...
Added in the macOS 10.7 SDK.
2024-03-05 01:28:10 +11:00
Daan
683332c950
Define reallocarr as weak to avoid symbol collision on gnu/Linux. #751 by @Romain-Geissler-1A
2024-03-02 17:12:58 -08:00
daanx
0ceef8e728
add fix for aligned_alloc override on musl; hopefully does not break Conda builds. issue #733
2023-04-24 08:15:42 -07:00
Daan
6cc0ad72fc
match declaration of mi_malloc_size_checked on macOS
2023-03-04 09:58:02 -08:00
Daan Leijen
95b61b8c3d
forward libc interface used by wasi-libc; originally by @anuraaga in PR #667 but rebased to the dev branch
2022-12-19 17:45:15 -08:00
Johannes Schindelin
745a34f475
Fix whitespace
...
This mostly deletes trailing spaces.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-12-03 00:24:20 +01:00
Daan
8098040c23
add pointer validity check on malloc_size when overriding on macOSX; issue #638
2022-11-25 16:38:20 -08:00
daan
84c706508c
fix false positives from valgrind in rptest
2022-10-30 10:45:51 -07:00
Daan Leijen
9afdf762a6
fix c++ compilation warning for an unused parameter
2022-04-10 12:55:59 -07:00
Daan
25ecec3c3b
fix for dynamic overriding on macOS; add warning about C++ compilation (as that does not interact well with interpose)
2022-04-07 16:12:16 -07:00
Daan
f1d7f972a9
Merge pull request #550 from devnexen/old_apple_build_fix
...
fix build on older macOs releases, aligned_alloc only from catalina.
2022-02-22 16:42:45 -08:00
David CARLIER
40e0507a59
fix build on older macOs releases, aligned_alloc only from catalina.
...
closes #549
2022-02-22 22:01:26 +00:00
Daan
3040da1cb8
add delete nothrow variants for aligned deletion as well (see #551 )
2022-02-22 13:52:31 -08:00
Daan
a8b5106ce2
fix address dereference in mi_reallocarr override
2021-12-15 16:33:49 -08:00
Daan
1b09877bc4
Merge branch 'dev' into netbsd_reallocarr
2021-12-15 16:27:26 -08:00
David Carlier
d6a56dd99d
introduces netbsd's reallocarr overriding.
...
and couple of tests.
2021-12-01 22:43:13 +00:00
daan
28896e5b19
prefix UNUSED,KiB,MiB,GiB; add mi_threadid_t type; add mi_ssize_t
2021-11-13 14:46:03 -08:00
daan
f2e3cca213
fix build for missing malloc_good_size
2021-11-04 19:10:15 -07:00
Daan
c47de7eb90
improve macOS overriding
2021-11-04 18:55:12 -07:00
Daan
32ee13f41e
improve macOS M1 performance; use interpose in combination with zone's; add -fno-builtin-malloc flag in building with MI_OVERRIDE
2021-11-02 21:54:44 -07:00
Daan Leijen
1b1c9186a4
suppress warning on discard attribute on forwards
2021-10-27 19:06:27 -07:00
David Carlier
898a23ec2b
fixes malloc_usable_size signature on FreeBSD.
2021-10-22 08:12:14 +01:00
Daan
4d89176eb4
add MI_USE_LIBATOMIC to link with -latomic on older systems (see also PR #429 ); rename MI_INTERPOSE to MI_OSX_INTERPOSE
2021-10-20 09:35:58 -07:00
Daan Leijen
a83bca72b3
fixes for M1; disable interpose use zones; fix pedantic warnings
2021-06-17 19:15:09 -07:00
Daan Leijen
c8b5b74500
improve warnings
2021-06-07 17:51:27 -07:00
Daan
16b3329bd4
Merge pull request #396 from jserv/fix-copyright-date
...
Bump copyright date
2021-04-28 13:11:11 -07:00
Daan Leijen
aca46242ab
update comment for aligned_alloc
2021-04-28 12:47:14 -07:00
Daan
45a8dc7f55
Merge pull request #385 from elbaro/fix/aligned-alloc
...
Fix aligned_alloc
2021-04-28 12:43:32 -07:00
Jim Huang
5940d3bcce
Bump copyright date
...
Each source file has been changed according to relevant Git activities.
2021-04-24 16:35:11 +00:00
Jim Huang
3402c6cc3f
Revise the use of macOS predefined macro
...
Quoted from "Porting UNIX/Linux Applications to OS X,"[1]
* macro __MACH__ is defined if Mach system calls are supported;
* macro __APPLE__ is defined in any Apple computer.
__MACH__ is not specific to macOS since GNU/Hurd runs on a Mach-based
microkernel (gnumach) [2]. __MACH__ is defined by the compiler,
leading to potential confusions. The solution is just changing the
checked identifier (i.e. __APPLE__), so it is really used only on
macOS.
[1] https://developer.apple.com/library/archive/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html
[2] https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html
2021-04-21 15:24:02 +08:00
elbaro
ad44f76598
commit
2021-04-11 03:09:23 +09:00
Daan Leijen
bb386025b5
update override on macOS with interpose of malloc_default_zone (issues #313 )
2020-12-15 16:03:54 -08:00
daan
5f51c97fbd
override aligned_alloc always if using C compilation (issue #276 )
2020-07-20 11:27:42 -07:00
Daan
81bd1b70b0
Merge pull request #238 from asl/gcc-6-aligned-dealloc
...
Fix override condition for sized dealloc with gcc 6
2020-05-01 14:16:20 -07:00
Anton Korobeynikov
0b440d9543
Apparently gcc 6 defines __cpp_aligned_new in C++14 mode, however no std::align_val_t is available there
...
for obvious reasons
2020-04-28 19:09:54 +03:00
Anton Korobeynikov
4a0c53ba5a
Fix the prototype of malloc_size. Otherwise we'll end with invalid
...
redeclaration if malloc/malloc.h is pulled on Darwin
2020-04-21 15:07:32 +03:00
daan
77acf5a868
more careful overriding of aligned_alloc for compilation on Conda ( #219 )
2020-04-20 09:27:43 -07:00
daan
211038c4e5
(possible) fix for overriding of aligned_alloc on systems that define it as static inline. issue #219
2020-04-15 11:55:54 -07:00
David Carlier
6c5039bad1
Android build fix proposal.
...
malloc_usable_size has different signature on this platform.
thread and real time apis are part of bionic.
2020-04-14 14:20:56 +01:00
daan
9062f39764
enable interpose separate from zones on macOS
2020-02-08 20:08:52 -08:00
daan
f3c47c7c91
improved malloc zone handling on macOSX (not working yet)
2020-02-02 21:03:09 -08:00