daan
d1bd1644d5
support zero-initialized memory detection
2019-09-02 13:16:52 -07:00
daan
31726c6554
fix type; fix comment
2019-09-02 10:18:34 -07:00
daan
783ae72743
Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
2019-09-02 09:53:30 -07:00
daan
9af51506a6
track commit and is_large status more precisely
2019-08-28 11:58:30 -07:00
David Carlier
3903a10e93
FreeBSD (and possibly NetBSD) build fix.
2019-08-28 07:17:58 +00:00
daan
a551f3abc4
more precise commit statistics
2019-08-27 18:08:03 -07:00
daan
23b5593af6
Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
2019-08-27 16:40:47 -07:00
David Carlier
b72a2d9659
macOS: anonymous page ID make it as env var.
2019-08-27 19:17:41 +01:00
daan
db8d443ae6
track more precisely if memory is fixed or committed
2019-08-26 22:45:26 -07:00
daan
eea093000a
graceful fallback for huge page allocation on Linux
2019-08-26 13:47:52 -07:00
daan
8b06ab1e49
fix check on gigabyte alignment of huge os pages on windows
2019-08-26 12:41:35 -07:00
daan
a654732d99
merge from dev new atomics
2019-08-26 12:30:03 -07:00
daan
2159c22415
fix atomic declaration on windows
2019-08-25 23:06:18 -07:00
daan
e8664001f7
Use standard _Atomic declarations and clean up atomic operations
2019-08-25 22:59:12 -07:00
daan
6e360d34ee
fix 1GB huge page flag on Linux
2019-08-25 13:15:26 -07:00
daan
d04d379f66
fix merge conflicts
2019-08-23 21:44:07 -07:00
daan
d3224d0bba
Merge branch 'dev' into dev-win
2019-08-23 21:42:32 -07:00
daan
25ea9cf142
on windows use 4TiB area for aligned allocation
2019-08-23 21:38:45 -07:00
daan
acde83543f
remove threadid from pages and keep page flags separate
2019-08-23 14:08:00 -07:00
daan
a1c5218ff5
use 4TiB area on windows 64-bit for aligned allocation
2019-08-23 11:33:06 -07:00
daan
5d3bf1c844
don't commit or reset in huge OS pages
2019-08-23 11:22:35 -07:00
Jakub Szymanski
ee475fd8cd
add warning when no avaiable mem
2019-08-21 11:11:36 -07:00
daan
7a2e0df5ea
merge from dev
2019-08-20 07:37:46 -07:00
daan
d52e4039b6
remove the reset_discards option
2019-08-20 07:06:11 -07:00
daan
05631ebfc4
Merge branch 'dev' into dev-win
2019-08-19 21:23:04 -07:00
daan
d2324f1c2a
always check large_os_pages enabled option so it can be changed during the running of the program
2019-08-19 21:22:24 -07:00
daan
82e1b40166
Merge branch 'master' into dev
2019-08-19 19:13:25 -07:00
daan
a8b24472cb
use 1GiB huge pages on windows when reserving upfront
2019-08-19 18:16:12 -07:00
daan
0e639addb0
add environment option to reserve huge pages upfront
2019-08-19 14:14:50 -07:00
daan
741f37e1f0
always check large_os_pages enabled option so it can be changed during the running of the program
2019-08-19 11:17:00 -07:00
daan
42dedb00ec
initial implementation of mi_os_reserve_huge_pages
2019-08-19 11:10:06 -07:00
David Carlier
b0003cb101
linux build correction
...
MAP_HUGE_2MB is linux specific and the related header
is not automatically included.
2019-08-14 15:07:13 +01:00
daan
8ca79b5359
Hide MEM_EXTENDED_PARAMETER to compile on older SDK's
2019-08-12 08:58:22 -07:00
daan
648f535c80
improve support for transparent huge pages on Linux (pr #115 )
2019-08-11 18:23:31 -07:00
daan
f5902a7a82
ensure webassembly allocation sizes are page aligned
2019-08-11 08:06:17 -07:00
daan
a1384bff72
avoid atomic read on aligned allocation on Linux
2019-08-11 08:00:10 -07:00
daan
2fee6f98d7
Merge branch 'master' into dev
2019-08-10 15:23:43 -07:00
daan
6f3bc87dcd
merge from dev
2019-08-10 10:26:46 -07:00
David Carlier
82ab9b4bd6
tracking anonymous page lifetime on macOS.
...
this platform allows to tag them per application up to 255.
2019-07-27 23:05:05 +01:00
daan
f0530b6a83
small optimizations, use bitwise aligne
2019-07-22 20:51:12 -07:00
daan
80e09ef44e
merge from dev
2019-07-22 10:16:59 -07:00
daan
7555260759
Merge branch 'jserv-include-what-you-use' into dev
2019-07-22 10:07:03 -07:00
daan
959d9289b1
merge and improve to upper case in options
2019-07-22 10:06:45 -07:00
daan
272a8e03e4
use atomic ops to guard large page tries on windows
2019-07-21 17:13:36 -07:00
daan
069f52523f
use hinted address to mmap to reduce mmap calls
2019-07-21 17:08:09 -07:00
Jim Huang
1e27cef873
Enforce strict include-what-you-use policy
...
The include-what-you-use (IWYU) policy is beneficial to faster
compilation and fewer recompilations. Many build tools, such as GNU make,
provide a mechanism for automatically figuring out what .h files a .cc
file depends on. These mechanisms typically look at #include lines. When
unnecessary #includes are listed, the build system is more likely to
recompile in cases where it is not necessary.
With the enforcement, header file <include/mimalloc.h> no longer
includes <stdlib.h>.
Reference:
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/WhyIWYU.md
2019-07-22 04:54:14 +08:00
daan
2ac2c6a1c3
fix format of error messages
2019-07-19 09:27:32 -07:00
caixiangyue
a215049b4a
fix typo
2019-07-19 16:23:14 +08:00
daan
0196622fff
Merge branch 'dev' into dev-exp
2019-07-15 11:10:12 -07:00
Daan
ad45dbf0e5
Merge pull request #32 from jedisct1/wasm
...
Port to WebAssembly
2019-07-15 11:03:46 -07:00
Daan
60e9d3f69d
Merge pull request #81 from devnexen/mac_large_page_2mb
...
initial support of 2MB pages on Mac
2019-07-15 10:56:53 -07:00
daan
beef7a8c70
Merge branch 'dev' into dev-exp
2019-07-15 09:47:09 -07:00
daan
7ba6192dd5
always pass commit flag to large page allocation on windows
2019-07-15 09:46:58 -07:00
Frank Denis
9129ab0f64
Port to WebAssembly
2019-07-15 02:22:41 +02:00
daan
672506a3b3
merged with dev-win
2019-07-14 12:57:47 -07:00
daan
89b7ffa8ed
link DiscardVirtualMemory dynamically as it is not supported on every windows
2019-07-13 08:12:16 -07:00
daan
f844665c9f
merge from dev-win
2019-07-10 22:57:37 -07:00
daan
c555e09504
Merge branch 'dev' into dev-win
2019-07-10 22:48:20 -07:00
daan
b80b0837ab
Merge branch 'dev-win' into dev-exp
2019-07-10 07:50:26 -07:00
daan
5b6f4ecc12
fix compilation warning
2019-07-10 07:50:04 -07:00
daan
224951695a
enable non eager commit
2019-07-10 07:24:56 -07:00
daan
46a9e51f74
enable non eager-commit flag
2019-07-10 07:17:21 -07:00
daan
95afe453f4
fix compilation warning on windows, issue #94
2019-07-09 23:49:12 -07:00
daan
3192ca4682
merge with dev-win
2019-07-09 23:34:17 -07:00
daan
0314373d93
add reset_decommit, reset_discard options; maintain more statistics
2019-07-09 20:24:00 -07:00
David Carlier
a192d6893e
initial support of 2MB pages on Mac
2019-07-05 20:05:04 +01:00
daan
663769c512
merge dev branch
2019-07-03 18:12:55 -07:00
daan
c3a5f84ad3
rewrite of low-level OS (aligned) allocation to better handle large pages and aligned allocation
2019-07-03 14:52:32 -07:00
daan
9390642879
fix windows dynamic malloc overried when both ucrtbase and msvcrt are loaded; also fix virtualalloc2 on 32-bit
2019-07-03 13:00:43 -07:00
daan
158705815e
fix aligned_ensured bug, trie inc bug, stats in the OS module
2019-07-03 00:16:27 -07:00
daan
10a29f17c8
more conservative shrinking of memory
2019-07-02 22:49:12 -07:00
daan
cec3c4f9ff
merge in dev branch
2019-07-02 17:28:15 -07:00
daan
5c0ffe9865
merge back changes to OS module from 'dev-exp'
2019-07-02 17:17:03 -07:00
daan
8cb36c62e6
merge with dev branch
2019-07-02 16:44:35 -07:00
daan
42efe51184
Merge branch 'master' into dev
2019-07-02 16:22:55 -07:00
daan
d35fc6cdc4
PR#66 by kickunderscore to ensure consistent small block alignment
2019-07-02 08:46:50 -07:00
daan
06bcea1761
Initial commit of separate memory region layer and improved large OS pages support, see 'memory.c'
2019-07-02 07:23:24 -07:00
David Carlier
bed746d7d6
Using BSD new PROT_MAX mmap to block page address wider promotions
2019-07-01 06:56:16 +00:00
daan
d6901558cd
enable large OS page support on Windows
2019-06-28 22:35:57 -07:00
daan
6eaf387891
Add support for aligned allocation on Windows using VirtualAlloc2
2019-06-28 19:48:30 -07:00
Frank Denis
236cd2e65c
fn() is not a valid C prototype
2019-06-25 12:16:36 +02:00
daan
cd7aa0ce83
improve handling of huge pages in the cache
2019-06-23 23:15:42 -07:00
daan
e5e2b789ba
fix pool commit for windows
2019-06-23 20:41:34 -07:00
Jim Huang
b1d299b35b
Clarify top-level license file
...
To be consistent with other Microsoft open source projects, each source
file points to the file "LICENSE" in top-level directory.
2019-06-23 19:53:34 +08:00
Kamil Rytarowski
b0b1b43dba
Fix build on NetBSD
...
Add missing argument in mi_mmap()
2019-06-23 00:06:41 +02:00
daan
26a874eb3f
initial checkin
2019-06-19 16:26:12 -07:00