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
18cf94dff6
move keys field in the page struct to keep offsets in the fast path the same for different build variants
2022-11-18 10:14:37 -08:00
daan
27fc2cf17e
fix random initializer
2022-11-07 14:57:07 -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
d8dd297974
add cmake option MI_WIN_REDIRECT to be able to explicitly disable linking with mimalloc-redirect on windows; always OFF on ARM, fixes issue #591 and #590
2022-10-31 15:26:21 -07:00
daan
c4663463d1
add mi_cdecl to functions to avoid errors when compiling with a different calling convention, see PR #592
2022-10-31 12:16:34 -07:00
Daan Leijen
f87cba9bd8
add max segment reclaim as an option
2022-04-14 16:05:49 -07:00
Daan Leijen
faca422b71
fix msvc warnings at level 4
2022-04-09 14:48:30 -07:00
Daan Leijen
6c91c75b14
remove thread local segment cache
2022-04-09 14:33:20 -07:00
Daan Leijen
5c7ada4b20
Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
2022-04-08 16:37:08 -07:00
Daan
b7677b6f84
fix atomic warnings on clang14 (issue #571 )
2022-04-08 14:09:38 -07:00
daan
185f296513
improve atomic operations for the thread metadata cache
2022-04-07 20:26:35 -07:00
daan
6e5788d076
add small cache for thread metadata for programs that create/destroy many OS threads
2022-04-07 20:17:48 -07:00
Daan
f4e221917b
Merge branch 'dev' into bun
2022-02-02 19:56:27 -08:00
Jarred Sumner
d2e727f0e8
Add MI_SKIP_COLLECT_ON_EXIT flag
2022-01-18 21:11:12 -08:00
Daan Leijen
0c814775b6
fix extern C declaration for msvc (issue #523 )
2022-01-12 16:59:50 -08:00
Daan Leijen
7a4104b3a9
avoid using atexit in a Windows dll; potential fix for #512
2022-01-11 15:42:27 -08:00
Daan Leijen
320f95f6cd
further fixes to allow statically linking mimalloc in DLL modules (issue #508 )
2022-01-10 16:07:22 -08:00
Daan
af5e0dff9e
Merge pull request #515 from res2k/msvc-late-cleanup
...
MSVC late cleanup
2022-01-10 14:59:03 -08:00
Daan
4fc63358a6
update copyright year
2022-01-10 12:01:26 -08:00
Frank Richter
17762a7eb1
Remove a redundant FlsSetValue()
2022-01-02 13:44:41 +01:00
Frank Richter
2b19908057
Expand comment on 'FLS early cleanup avoidance' in mi_process_init()
2022-01-02 13:44:41 +01:00
Frank Richter
f456bc75ea
Perform thread cleanup for main threads as late as possible for Windows static builds
2022-01-02 13:44:41 +01:00
Frank Richter
d24262f477
Prefer MSVC 'data section magic' over C++ static initialization
2022-01-02 13:44:41 +01:00
daan
55ccc94707
wip: fix zero init for sbrk; add lock around sbrk
2021-12-15 19:28:34 -08:00
daan
85eccf324f
Merge branch 'master' into dev
2021-11-14 16:44:54 -08:00
daan
09e59e0610
use size_t instead of uintptr_t where appropiate
2021-11-13 15:13:16 -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
dbf8bafc3a
avoid accessing the thread_id after process initialized is set
2021-11-02 21:50:15 -07:00
Daan
d0d47e6489
avoid accessing the thread_id after process initialized is set
2021-11-02 21:49:05 -07:00
Daan
2417f6d8a7
Merge pull request #474 from tiran/mi_prefix_os_random
...
Rename _os_random_weak to _mi_os_random_weak
2021-10-21 15:21:19 -07: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
LongYinan
45321237b5
Fix ARM64 MSVC linker problem
...
Close https://github.com/microsoft/mimalloc/issues/426
2021-10-21 21:15:08 +08:00
Daan Leijen
22c2fd82cc
ensure managed os memory is at least one arena block in size
2021-10-18 20:44:19 -07:00
Daan Leijen
bcce4d52bf
fix bug in determination of block size in pre-reserved arena memory
2021-10-18 20:39:39 -07:00
paulip1792
a2c3b0f8af
add option to reserve huge os pages at a specific numa node.
2021-08-10 16:30:44 +08:00
Daan Leijen
4ba32c3160
Revert "make all includes relative"
...
This reverts commit 1feb6123d9
.
2021-06-07 16:47:57 -07:00
Daan Leijen
1feb6123d9
make all includes relative
2021-06-06 20:31:36 -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
Daan Leijen
71ac98ab08
rename <Windows.h> include to <windows.h> for mingw compatibility (see pr #367 )
2021-02-22 13:04:11 -08:00
Daan Leijen
35c1fc2be9
limit memcpy as rep stosb to windows where the cpu supporst FSRM; add mi_memcpy_aligned for machine-word aligned copy. see issue #201 and pr #253
2021-01-30 14:33:46 -08:00
Daan
9b966c3492
Merge pull request #253 from haneefmubarak/memcpy-rep-movsb-windows-201
...
resolve #201 with a platform-selective REP MOVSB implementation
2021-01-29 16:00:00 -08:00
Anton Korobeynikov
765fc9c0ca
Unify statistic collection:
...
- For MI_STAT == 0 no allocation stats are collected
- For MI_STAT == 1 only aggregated values (across normal, large and huge heaps) are collected
- For MI_STAT == 1 separate per-bin collection for normal heap is done as well
2020-11-11 11:41:39 +03:00
daan
8607ff617c
add environment option mi_reserve_os_memory
2020-09-08 17:16:31 -07:00
daan
14b8d27386
track pinned memory separately from large os pages
2020-09-08 16:46:03 -07:00
daan
f09549c98f
use main stats for thread count
2020-09-05 18:00:36 -07:00
daan
b4825372ab
small compilation warning fixes (extra semicolon etc)
2020-08-29 19:30:38 -07:00
daan
9e7322f900
collect memory on process exit for statically linked library (issue #281
2020-07-29 21:27:01 -07:00
Wanja Vogel
2599512e8f
use stored pointer #257
2020-06-18 18:20:26 +02:00