Commit Graph

1159 Commits

Author SHA1 Message Date
Daan Leijen
1b1c9186a4 suppress warning on discard attribute on forwards 2021-10-27 19:06:27 -07:00
Daan
db223e4adb merge from dev 2021-10-27 18:09:16 -07:00
Daan
5fd77aa198 refactor os_overcommit detection 2021-10-27 17:39:11 -07:00
Daan
0335d32766 Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev 2021-10-27 17:25:09 -07:00
Daan
13b30bf2dd
Merge branch 'dev' into overcommit_if_the_system_approves 2021-10-27 17:12:18 -07:00
Daan
6ccf7e87c0 minor edits 2021-10-27 17:08:00 -07:00
Daan
a0c7cf56e6
Merge pull request #477 from devnexen/numa_domains_fbsd
NUMA base detection on FreeBSD.
2021-10-27 17:01:52 -07:00
Daan
8cf618a452
Merge pull request #476 from devnexen/malloc_usable_size_fbsd
fixes malloc_usable_size signature on FreeBSD.
2021-10-27 12:11:43 -07:00
Daan
7756e1b5fe fix assertion 2021-10-27 10:45:19 -07:00
Daan
e477633779 fix assertion 2021-10-27 10:41:14 -07:00
Daan
1568dbb9e4 fix mi_is_valid_pointer bit index search (related to issue #478) 2021-10-27 10:35:16 -07:00
Daan
54b65a556c fix mi_cfree assertion failure for NULL pointer, issue #478 2021-10-27 10:15:12 -07:00
Daan
6d9e79a498 merge from dev 2021-10-27 10:11:51 -07:00
Daan
ca9785d40e fix compilation with MI_DEBUG>3, issue #480 2021-10-27 10:06:34 -07:00
David Carlier
00edd9201b proposal to not overcommit page unconditionally on Linux and FreeBSD,
respecting userland settings.
2021-10-24 20:57:58 +01:00
David Carlier
2d2d9af5c6 while at it, doing dragonflybsd too 2021-10-24 11:37:20 +01:00
David Carlier
fc7777ee8c NUMA base detection on FreeBSD. 2021-10-22 10:11:20 +01:00
David Carlier
898a23ec2b fixes malloc_usable_size signature on FreeBSD. 2021-10-22 08:12:14 +01:00
Daan
725fe2ac7d Merge branch 'dev' into dev-slice 2021-10-21 16:17:31 -07:00
Daan
02938b7048
Merge pull request #471 from devnexen/haiku_build_update
Haiku build update, since the beta3 few more posix functions are avai…
2021-10-21 15:25:52 -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
David CARLIER
b5b52b8879 Haiku build update, since the beta3 few more posix functions are available e.g. madvise 2021-10-20 18:33:12 +00:00
Daan
de00de96fd merge with dev 2021-10-20 09:56:03 -07:00
Daan
d482555675 Fix warnings on osx with g++ compilation 2021-10-20 09:55:21 -07:00
Daan
e02f88a11c Fix warnings with g++-11 compilation 2021-10-20 09:55:03 -07:00
Daan
b47d0802d1 Merge branch 'dev' into dev-slice 2021-10-20 09:36:08 -07: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
d4397ce16c merge from dev 2021-10-19 15:13:53 -07:00
Daan Leijen
10c31f9b41 fix warnings 2021-10-19 15:13:01 -07:00
daan
505ea78cae Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev 2021-10-19 15:07:19 -07:00
Daan
3bf7b4313c add comment 2021-10-19 14:03:48 -07:00
Daan
ae5aae7e10 allow decommit in arena separate from initial commit 2021-10-19 14:00:40 -07:00
Daan
2583ab73dc remove region.c which belongs in dev only 2021-10-19 13:57:36 -07:00
Daan
35b928b08f use MADV_DONTNEED instead of mmap fixedfor simplification and possibly better performance on Linux 2021-10-19 13:18:54 -07:00
Daan
bb00a5a32e remove MADV_FREE_REUSABLE from mi_os_reset as it needs MADV_FREE_REUSE to reuse the memory again. 2021-10-19 13:11:11 -07:00
Daan
aeb73b0cd4 merge from dev 2021-10-19 12:55:10 -07:00
Daan
9a724889ea refine stat output with new SI units 2021-10-19 12:50:16 -07:00
Daan
75987e4590
Merge pull request #410 from jserv/enforce-binary-prefix
Distinguish SI and Binary Prefixes
2021-10-19 12:28:33 -07:00
Daan
2adf69859b
Merge pull request #418 from devnexen/haiku_build_fix
haiku biuld fix proposal, warning suppression.
2021-10-19 12:19:44 -07:00
Daan
6068a8bb1b
Merge pull request #420 from hankluo6/typo
Fix typo
2021-10-19 12:17:44 -07:00
Daan
adeef8d403 formatting 2021-10-19 10:31:49 -07:00
Daan
4b52ce4095
Merge pull request #450 from bmalrat/FixStatOnWindowsRealloc
Fixed stats in mi_os_mem_alloc_aligned on windows when re-allocate
2021-10-19 10:29:16 -07:00
Daan
20a3eee6f0
Merge pull request #449 from bmalrat/FixTypo
Fixed typo in header
2021-10-19 10:24:54 -07:00
Daan
f945dbb390 add space after _Atomic to prevent errors on msvc without /TP (see PR #452) 2021-10-19 10:18:44 -07:00
Daan
a4078df9d5 Merge branch 'dev' into dev-slice 2021-10-19 10:17:53 -07:00
Daan
f0f9aecfe4 add comment on #if ending 2021-10-19 09:52:20 -07:00
Daan
4841bc1721
Merge pull request #465 from thomcc/no-getenv
Add an option to disable environment access inside options.c
2021-10-19 09:49:34 -07:00
Daan
ea46430016
Merge pull request #468 from tiran/default_source
Define _DEFAULT_SOURCE for syscall and realpath
2021-10-19 09:40:21 -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
Daan
d49b3a95a2
Merge pull request #464 from JJL772/master
Fix `_mi_error_message` printf formatting error
2021-10-19 09:28:20 -07:00
Christian Heimes
afbcf20f24 Define _DEFAULT_SOURCE for syscall and realpath
Define ``_DEFAULT_SOURCE`` in ``random.c`` and ``alloc.c``. The macro
is required for ``syscall()`` and ``realpath()``. Other files like
``os.c`` already define the macro.

Signed-off-by: Christian Heimes <christian@python.org>
2021-10-19 15:07:54 +02: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
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
Daan
d6bbc08119 prefer monotonic clock for stats (issue #457) 2021-10-18 18:24:59 -07:00
Daan Leijen
6ef15943cc fix comments 2021-10-18 16:59:19 -07:00
Daan Leijen
8d2a21eb78 Merge branch 'dev' into dev-slice 2021-10-18 16:46:18 -07:00
Daan Leijen
bd8e3fd8e1 increase robustness of primitive windows allocation by always using a fallback to VirtualAlloc 2021-10-18 16:46:06 -07:00
Daan Leijen
54659aec9e merge from dev 2021-10-18 16:28:08 -07:00
Daan Leijen
0fb61c9eaa do not call exit if try handler fails but use abort instead 2021-10-18 16:25:10 -07:00
Thom Chiovoloni
3c058f07a9
Add an option to disable automatic use of getenv inside options.c 2021-10-08 23:59:35 -07:00
Jeremy Lorelli
c21b6df51e Fix missing parameter in mi_free error message 2021-10-05 08:41:03 -07:00
Daan Leijen
e6b58052da add start offset to pages to reduce cache/page effects 2021-10-02 11:13:00 -07:00
Daan Leijen
262022c1d1 fix segment map for 32-bit systems (including wasm) 2021-10-01 15:10:11 -07:00
Daan Leijen
d7ac4478a8 Merge branch 'dev' into dev-slice 2021-10-01 15:05:41 -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
paulip1792
a2c3b0f8af add option to reserve huge os pages at a specific numa node. 2021-08-10 16:30:44 +08:00
bmalrat
ee0b01c84d Fixed stats in mi_os_mem_alloc_aligned on windows when re-allocate
In the last try the previous mi_os_mem_free decrease stat and mi_win_virtual_alloc doesn't increase it
2021-08-04 17:46:58 -04:00
bmalrat
30be78d97a Fixed typo in headers 2021-08-04 17:31:48 -04:00
Jim Huang
c4947c8879 Use secure random generator on macOS
The implementation of arc4random_buf differs from its documentation. It
is documented as "always successful, and no return value is reserved to
indicate an error" for the sake of FreeBSD compatibility [1]. However,
the actual implementation on macOS invokes function "ccrng_generate" [2]
without validating the error cases. It might fail silently[3], which leads
to unexpected source of entropy.

The original arc4random used the RC4 a.k.a. ARC4 algorithm, and ChaCha20
based implementation was introduced in FreeBSD 12.0. Since macOS 10.12,
it was replaced with the NIST-approved AES cipher, and it may be replaced
again in the future as cryptographic techniques advance. Therefore, we
should not assume that arc4random never fails.

On the contrary, CCRandomGenerateBytes(), part of Cryptographic Services [4],
returns cryptographically strong random bits with explicit status code.
This patch properly calls CCRandomGenerateBytes() and checks the status.

[1] https://www.freebsd.org/cgi/man.cgi?query=arc4random_buf
[2] https://opensource.apple.com/source/CommonCrypto/CommonCrypto-60178.40.2/lib/CommonRandom.c.auto.html
[3] https://opensource.apple.com/source/Libc/Libc-1439.40.11/gen/FreeBSD/arc4random.c.auto.html
[4] https://developer.apple.com/documentation/security
2021-06-25 12:37:00 +08:00
hank
1c1571742d fix typo 2021-06-21 22:36:47 +08:00
David Carlier
a35a7d4f19 haiku biuld fix proposal, warning suppression. 2021-06-19 09:14:43 +00:00
Daan Leijen
b3b0fb5832 merge from dev 2021-06-17 20:05:40 -07:00
Daan Leijen
728be93977 fix for #414 making numa node count atomic 2021-06-17 19:38:51 -07:00
Daan Leijen
5869c85749 merge from dev 2021-06-17 19:18:57 -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
e592360d4d revert relative includes 2021-06-07 17:53:03 -07:00
Daan Leijen
6ba9387bf8 Merge branch 'dev' into dev-slice 2021-06-07 17:51:42 -07:00
Daan Leijen
c8b5b74500 improve warnings 2021-06-07 17:51:27 -07:00
Daan Leijen
d7eb0bab75 Merge branch 'dev' into dev-slice 2021-06-07 17:01:00 -07:00
Daan Leijen
bb957fcd81 Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev 2021-06-07 17:00:35 -07:00
Daan
cd633b2e2a
Merge pull request #411 from jserv/predict-alloc_size
Add branch hint for _mi_os_good_alloc_size
2021-06-07 16:55:39 -07:00
Daan Leijen
9974b0ee23 Merge branch 'dev' into dev-slice 2021-06-07 16:51:14 -07:00
Daan Leijen
4ba32c3160 Revert "make all includes relative"
This reverts commit 1feb6123d9.
2021-06-07 16:47:57 -07:00
Daan Leijen
069b3276df merge from dev 2021-06-06 20:33:55 -07:00
Daan Leijen
7b595bd957 Merge branch 'dev' into dev-slice 2021-06-06 20:31:53 -07:00
Daan Leijen
1feb6123d9 make all includes relative 2021-06-06 20:31:36 -07:00
Jim Huang
d48c93af2c Add branch hint for _mi_os_good_alloc_size
In _mi_os_good_alloc_size, overflow caused by alignment size is rare,
and this patch added the appropriate branch hint during range checks.
2021-05-31 12:01:35 +08:00
Jim Huang
0f57425f80 Distinguish SI and Binary Prefixes
SI prefixes [the decimal prefixes] refer strictly to powers of 10. They
should not be used to indicate powers of 2. e.g., one kilobit
represents 1000 bits instead of 1024 bits. IEC 60027‐2 symbols are
formed adding a "i" to the SI symbol (e.g. G + i = Gi).
2021-05-30 20:13:28 +08:00
Daan Leijen
10ce8839fa merge from dev 2021-04-28 13:23:46 -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
29ea7a89ab add braces 2021-04-28 13:08:59 -07:00
Daan
6d1658123c
Merge pull request #391 from jserv/improve-align-down
Rewrite align_down with bitwise operations
2021-04-28 13:07:13 -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
52943917ad Rewrite align_down with bitwise operations
mi_align_down_ptr was implemented with multiplication and division,
which can be converted to equivalent and deterministic bit operations.
2021-04-21 13:14:53 +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
4e643b6d31 merge from dev 2021-02-24 15:53:26 -08:00
Daan Leijen
5f596056c9 use 2-6TiB area for hints to accommodate pre-windows8 better 2021-02-24 15:49:43 -08:00
Daan Leijen
e64474e06b add virtiual gaps between hinted allocations in secure mode 2021-02-24 15:30:39 -08:00
Daan Leijen
ad96d220f4 merge from dev 2021-02-24 15:17:35 -08:00
Daan Leijen
9317256a4f improved ASLR (issue #372) 2021-02-24 15:14:17 -08:00
Daan Leijen
47050371a1 fix issue #363 and disable assertion for now 2021-02-22 15:05:47 -08:00
Daan Leijen
8f69e7095d Merge branch 'dev' into dev-slice 2021-02-22 14:28:22 -08:00
Daan Leijen
3228bb685f set errno ENOMEM for limited arena allocation (issue #295) 2021-02-22 14:17:25 -08: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
7962420697 fix bug in bitmap is_claimed_across; issue #368 2021-02-22 12:37:08 -08:00
Daan Leijen
ba84aa2783 Merge branch 'dev' into dev-slice 2021-02-01 15:47:37 -08:00
Daan Leijen
c426ab4ea2 add condition to avoid compilation error on vs2015 (#issue 353) 2021-02-01 15:41:41 -08:00
Daan Leijen
0091a641a7 undo previous commit dcae918 due to wrong logic (issue #289) 2021-02-01 09:55:18 -08:00
Daan Leijen
dcae918b84 always do ASLR in secure mode even in debug mode (issue #289) 2021-02-01 09:49:12 -08:00
Daan Leijen
36b7a3cb03 merge from dev 2021-01-30 16:37:38 -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 Leijen
b93cba3b05 merge from dev 2021-01-29 16:53:52 -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
Daan Leijen
3bade4b1bd fix accounting of abandoned pages 2021-01-29 15:42:52 -08:00
Daan Leijen
542f577c81 Merge branch 'dev' into dev-slice 2021-01-29 15:23:36 -08:00
Daan Leijen
a6fa7b083e make current stat the third column instead of first 2021-01-29 14:45:16 -08:00
Daan
fb9c6ce127
Merge pull request #327 from asl/stats-cur
Print current values of stat counters as well.
2021-01-29 14:35:13 -08:00
Daan Leijen
f68c1a74da fix assertion comparison (#353) 2021-01-29 14:34:14 -08:00
Daan Leijen
72559c5c49 merge from dev 2021-01-29 13:08:00 -08:00
Daan Leijen
a8b282091f update formatting of statistics 2021-01-29 13:03:06 -08:00
Daan
b759bcf5c7
Merge pull request #329 from asl/mi_stat_agg
Unify statistics collection
2021-01-29 12:52:29 -08:00
Daan Leijen
e314699ee0 add debug view of arenas 2021-01-28 17:32:42 -08:00
Daan Leijen
217871cb45 fix search_idx start in managed arenas 2021-01-22 11:24:25 -08:00
Daan Leijen
3c70317393 merge from dev 2020-12-15 16:07:23 -08: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 Leijen
b803095b83 merge from dev 2020-12-10 13:17:56 -08:00
unknown
745cf1e2f5 fix build on ghc4.8 (issue #330) 2020-12-10 12:33:35 -08:00
unknown
d1d06b67eb fix type warning (issue #337) 2020-12-10 12:13:06 -08:00
unknown
b7087d3625 Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev 2020-12-10 11:57:16 -08:00
Daan
7958d0df57
Merge pull request #331 from devnexen/mi_bitmap_try_find_claim_field_accross_little_chg
mi_bitmap_try_find_claim_field_across
2020-12-10 11:57:08 -08:00
unknown
701da6b42e Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev 2020-12-10 11:53:35 -08:00
Daan
9d0555c65b
Merge pull request #326 from asl/mi_stat_counter
Honour MI_STAT in couple more places
2020-12-10 11:53:30 -08:00
unknown
f37a3db37c cleanup madv_resuable 2020-12-10 11:51:58 -08:00
unknown
cbc14a9287 count warnings and errors separately 2020-12-10 10:28:54 -08:00
Daan
56a1c852ea
Merge pull request #325 from asl/max-error-counter
Do not use the same counter for warnings and errors
2020-12-10 10:23:08 -08:00
David Carlier
bbdf470715 mi_bitmap_try_find_claim_field_across
number of leading zeros is unsigned.
2020-11-18 17:21:51 +00: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
Anton Korobeynikov
00fb89f771 Rename the field 2020-11-11 11:41:33 +03:00
unknown
ad05829195 remove shadow warning when building in static mode 2020-11-06 17:49:10 -08:00
Anton Korobeynikov
d9a0624529 Print current values of stat counters as well.
For some reasons unknown to me the current values of stat counters are never printed.
This makes is quite hard to use printing during the debugging in the middle
of program run.
2020-11-02 00:24:24 +03:00
Anton Korobeynikov
39bcf8a6b0 Honour MI_STAT in couple more places. 2020-11-02 00:14:02 +03:00
Anton Korobeynikov
9c45221243 Do not use the same counter for warnings and errors.
Warnings happen normally and could be safely ignored in the most cases,
however errors, if enabled, should not be ignored. Currently since warnings
and errors share the same counter we effectively stop showing errors after
16 warnings (which happen all the time).

Use different counters for errors and warnings.
2020-11-01 23:57:42 +03:00
David Carlier
1deea03bf1 On Darwin, using MADV_FREE_REUSABLE/MADV_FREE_REUSE.
The former to notify the pages are available for other processes,
 the latter is needed for proper counting in case those pages where
tagged as reusable previously otherwise is a no-op, all for better
 RSS reporting for task_info apps.
2020-10-31 22:22:04 +00:00
daan
10aca1cfb9 merge from dev 2020-10-15 20:01:38 -07:00
daan
ca13e9cd59 better instruction scheduling for alloc 2020-10-15 19:46:33 -07:00
daan
69f935944f add test to avoid searching arenas when possible 2020-10-15 19:46:19 -07:00
daan
7e96634da4 merge from dev 2020-10-11 13:38:12 -07:00
daan
6279835976 fix unused parameter warning 2020-10-11 13:22:14 -07:00
daan
7114d5424a fix statistics to include padding correctly (issue #301) 2020-10-11 13:14:43 -07:00
daan
5d2b925f3e wrap MI_SECURE conditional in #ifdef to avoid warnings (issue #311) 2020-10-11 10:56:57 -07:00
daan
ead1f34930 add extra NULL checks for heap parameters in the heap API (issue #311) 2020-10-11 10:50:09 -07:00
daan
e1c38eef76 use allow_decommit option for both the segment cache and pages 2020-09-24 17:20:39 -07:00
daan
b149099bf3 use relaxed load for last search position in an arena 2020-09-24 16:55:00 -07:00
daan
2822e5c1f3 Merge branch 'dev' into dev-slice 2020-09-24 16:33:22 -07:00
daan
ed8cc1fc19 Merge branch 'master' into dev 2020-09-24 16:32:56 -07:00
daan
1233de7388 use relaxed load for region count as that is monotonic 2020-09-24 16:29:41 -07:00
daan
44d030ba9d fuse used decrement with test for slightly better codegen 2020-09-24 16:28:25 -07:00
daan
b59abce8ea Merge branch 'dev' into dev-slice 2020-09-24 10:16:54 -07:00
daan
9d5098c705 bump version to 1.6.7 for further development 2020-09-24 10:16:40 -07:00
daan
f88b4b4c27 extend mi_process_info to include elapsed time 2020-09-24 10:13:25 -07:00
daan
165b64f553 Merge branch 'dev-exp' into dev-slice 2020-09-24 09:11:58 -07:00
daan
c05302f097 Merge branch 'dev' into dev-exp 2020-09-24 09:11:49 -07:00
Daan Leijen
b1cc3d550c fix valid pointer detection on mac 2020-09-14 10:55:44 -07:00
Daan
6d47e65b78
Merge pull request #302 from devnexen/haiku_build_fix
Haiku build fix.
2020-09-14 09:11:25 -07:00
daan
fba65c440c merge from dev-exp 2020-09-14 09:05:16 -07:00
daan
d89c23efce merge from dev 2020-09-14 09:03:52 -07:00
daan
840eba2874 improve handling of out-of-memory situations 2020-09-14 09:02:06 -07:00
Igor Kostenko
bf9c3bd088 Fix rare access violation on out of memory 2020-09-14 10:50:22 +01:00
daan
01307a25ff fix assertion 2020-09-11 11:00:19 -07:00
daan
1d946146cc fix all_committed 2020-09-11 10:40:22 -07:00
David Carlier
568d6e532b Haiku build fix.
Haiku does not provide page faults statistics only system wide.
2020-09-10 18:49:19 +00:00
daan
fa01875eb2 merge from dev (with is_pinned/is_large separation) 2020-09-08 17:54:58 -07:00
daan
8607ff617c add environment option mi_reserve_os_memory 2020-09-08 17:16:31 -07:00
daan
364674185e add option to limit OS allocation and only allow allocation from arenas 2020-09-08 16:56:51 -07:00
daan
14b8d27386 track pinned memory separately from large os pages 2020-09-08 16:46:03 -07:00
daan
d87933a3b5 update comments 2020-09-08 15:50:37 -07:00
daan
037285ac09 refactor segment cache and map in a separate source file 2020-09-08 13:27:34 -07:00
daan
161f9a7751 refactor arena allocation 2020-09-08 11:12:44 -07:00
daan
97629cefaa tune performance options with longer reset delay 2020-09-08 11:12:23 -07:00
daan
a948724340 merge from dev (bitmap split) 2020-09-08 10:33:30 -07:00
daan
c86459afef split bitmap code into separate header and source file 2020-09-08 10:14:13 -07:00
daan
30b993ecf3 consolidate bit scan operations 2020-09-08 09:27:57 -07:00
daan
6b013d5f38 test for arena count early; skip test in bitmap_mask_ for perf 2020-09-07 22:55:36 -07:00
daan
371532ff02 merge from dev 2020-09-07 21:43:05 -07:00
daan
c7272afa9a add mi_reserve_os_memory/mi_manage_os_memory; allow arena allocations to cross multiple bitmap fields 2020-09-07 21:34:34 -07:00
daan
313008ecaa ensure page->retire_expire is always 1 2020-09-07 15:20:59 -07:00
daan
3826132240 use dynamic initial commit 2020-09-06 14:51:20 -07:00
daan
b7046934e5 Merge branch 'dev' into dev-slice 2020-09-06 13:53:30 -07:00
daan
46ee8952eb update mi_process_info to not use doubles 2020-09-06 13:53:02 -07:00
daan
8c838a949f Merge branch 'dev' into dev-slice 2020-09-06 13:22:44 -07:00
daan
ee286919d9 add mi_process_info api call 2020-09-06 13:21:19 -07:00
daan
8e0d846b40 consistent commit order 2020-09-06 12:19:05 -07:00
daan
828613a694 use MADV_DONTNEED for commit/decommit on macOS 2020-09-06 12:06:56 -07:00
daan
5ae01fe4d9 experiment with commit strategy on macOS 2020-09-06 09:39:16 -07:00