Commit Graph

215 Commits

Author SHA1 Message Date
Daan Leijen
35d332141d experimental destroy_on_exit option for statically linked mimalloc in a dynamically unloaded DLL 2022-11-18 11:00:23 -08:00
Daan Leijen
8834e128e8 improve mi_free codegen 2022-11-18 10:13:51 -08:00
daan
2479d168ad decommit unused prefix of large aligned blocks 2022-11-07 16:41:40 -08:00
daan
3e1d800e9b potential fix for windows static linking with thread creation in dll's 2022-11-07 14:47:53 -08:00
daan
2daec6c72f add more comments 2022-11-07 11:23:04 -08:00
Daan
d3715132d1 move null ptr check 2022-11-06 09:52:54 -08:00
daan
4b91ff760d initial working large alignment 2022-11-05 16:40:42 -07:00
daan
6a80fa3ac1 initial progress on removing alignment limit 2022-11-05 14:46:52 -07:00
daan
698bb2cae7 split out _mi_page_try_use_delayed_free for contention reduction (issue #630) 2022-10-31 11:01:01 -07:00
daan
7bef5f5f5b reduce contention on the delayed_free lock; see issue #630 2022-10-31 10:34:55 -07:00
daan
eee7c40da5 updates to run valgrind on test-api 2022-10-29 11:43:09 -07:00
daan
bc8f23aa0d rename track macros to lowercase 2022-10-29 10:44:10 -07:00
daan
6eeb81ee05 initial progress on valgrind integration 2022-10-28 19:54:56 -07:00
Daan Leijen
864e4be5ce add is_aligned check 2022-04-20 17:33:31 -07:00
Daan Leijen
7bc602ebb4 redefine mi_likely/mi_unlikely to work with C++ 20 [[likely]] attributes 2022-04-19 19:50:06 -07:00
Daan Leijen
d69d4c861f add zero parameter to primitive allocation to improve codegen for calloc etc 2022-04-19 18:32:35 -07:00
Daan Leijen
f4744bd192 fix further annotation warnings for vs2022 2022-04-19 17:35:07 -07:00
Daan Leijen
ca0bac743d maintain backward compatible option order 2022-04-14 16:10:36 -07:00
Daan Leijen
3c7ce7d3c6 improve mi_realloc codepath 2022-04-07 19:09:31 -07:00
David Carlier
b1e1b0573c tls revives inline asm for openbsd 2022-01-27 07:01:32 +00:00
Daan
4fc63358a6 update copyright year 2022-01-10 12:01:26 -08:00
Daan
4b63c76861 avoid conditional load on macos 2022-01-10 11:40:36 -08:00
daan
43e5cd2671 revise assembly test for the _mi_threadid(); fix issue #495 with musl libc on arm; test specifically for bionic libc on Android 2022-01-01 15:54:06 -08:00
daan
30a99e2c51 default to portable C for the thread id on arm 32-bit, issue #495 2021-12-17 13:48:39 -08:00
daan
89f583a69b improve aligned allocation performance 2021-12-17 13:18:05 -08:00
daan
55ccc94707 wip: fix zero init for sbrk; add lock around sbrk 2021-12-15 19:28:34 -08:00
Daan
4a586808f7 merge 2021-12-15 16:52:36 -08:00
Daan
317093d78b fix Android overriding (issue #381 and PR #487) 2021-12-15 16:48:57 -08:00
Daan
17456f18d1
Merge pull request #489 from devnexen/remove_dfbsd_warning
removes dragonflybsd warning since the api and library overriding wor…
2021-12-15 16:37:56 -08:00
Daan
523e6d5c9b fix thread slot on arm32 (issue #495) 2021-12-15 16:05:07 -08:00
Daan
3a212d1895 fix assembly for mi_tls_slot_set on x32 and x64. Issue #488 2021-12-12 10:35:13 -08:00
DC
20e37bf7c1 removes dragonflybsd warning since the api and library overriding works, also
for the os doc report purpose.
2021-11-28 08:14:21 +00:00
daan
9183b1eec0 remove experiment with unsafe_free_with_threadid 2021-11-23 19:04:41 -08:00
daan
8b60a5ab70 add mi_unsafe_free_with_threadid and mi_get_current_threadid() 2021-11-23 17:59:27 -08:00
Daan
9c9c3a0311
Merge pull request #485 from devnexen/builtin_overflow_sig_fix
fix spurious build warning with overflow builtins
2021-11-14 14:47:38 -08:00
daan
4b0cda2012 take overcommit into account for eager commit delay 2021-11-14 11:23:11 -08: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
f9ac60a90f suppres eager commit delay for the first 4 threads 2021-11-12 19:03:20 -08:00
Daan
e853f530a0 add noexcept attributes to improve mi_free codegen 2021-11-04 18:54:57 -07:00
Daan
751a2249c8 add mi_decl_externc, nice layout 2021-11-02 21:53:20 -07:00
dc
5b0e73281f fix spurious build warning with overflow builtins 2021-10-28 22:43:21 +01:00
Christian Heimes
13de1920ae Rename _os_random_weak to _mi_os_random_weak
The ``_os_random_weak`` function is the only non-static function
besides ``_ZSt15get_new_handlerv`` that is not prefixed with ``mi`` or
``_mi``.

The discrepancy was discovered by CPython's smelly script. The checker
looks for exported symbols that don't have well-defined prefixes.

Signed-off-by: Christian Heimes <christian@python.org>
2021-10-21 21:40:45 +02:00
Daan
6068a8bb1b
Merge pull request #420 from hankluo6/typo
Fix typo
2021-10-19 12:17:44 -07:00
Daan
1917fbd847
Merge pull request #467 from tiran/strict_prototypes
Fix strict function prototype warnings
2021-10-19 09:35:40 -07:00
Christian Heimes
7c73e3996d Fix strict function prototype warnings
Fix warning ``warning: function declaration isn’t a prototype`` when
building mimalloc with ``-Wstrict-prototypes`` flag. In C argumentless
functions should be declared as ``func(void)``.

Reproducer:
```shell
$ cmake ../.. -DCMAKE_C_FLAGS="-Wstrict-prototypes"
$ make VERBOSE=1
```

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Neil Schemenauer <nas@arctrix.com>
Signed-off-by: Christian Heimes <christian@python.org>
2021-10-19 10:48:26 +02:00
Daan Leijen
9c5928060e Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev 2021-10-01 15:10:42 -07:00
Daan Leijen
679aad0659 update wasm support with emscripten compilation; now using sbrk instead of wasm_memory_grow 2021-10-01 15:05:01 -07:00
Jim Huang
4369fe4323 Eliminate preprocessor warnings due to undefined "__GNUC__" with ClangCL
When building some code against mimalloc with C inside Visual Studio
with ClangCL, the compiler complains about __GNUC__ being undefined.

Reported by Mojca Miklavec.

Close #422
2021-06-24 17:29:06 +08:00
hank
1c1571742d fix typo 2021-06-21 22:36:47 +08:00
Daan Leijen
728be93977 fix for #414 making numa node count atomic 2021-06-17 19:38:51 -07:00