273 Commits

Author SHA1 Message Date
Daan
270e765454
Merge pull request #148 from pitrou/tls-local-dynamic
Fix #147: provide CMake option for alternate TLS mechanism
2019-09-09 08:05:22 -07:00
Antoine Pitrou
b69a4b52c0 Fix #147: provide CMake option for alternate TLS mechanism
This allows use of dlopen() with mimalloc on Unix.
2019-09-04 12:02:16 +02:00
Daan
6e6e8ef800
Update readme.md 2019-09-02 10:22:52 -07:00
Daan
7f6fd95308
Merge pull request #145 from pitrou/cmake-disable-tests
Add an option to disable building tests
2019-09-02 09:50:32 -07:00
Daan
683989a85c
Merge pull request #146 from carenas/master
use TLS guard OpenBSD
2019-09-02 09:49:35 -07:00
Carlo Marcelo Arenas Belón
0e35ec3879 avoid deadlock with OpenBSD 2019-09-01 01:06:01 -07:00
Antoine Pitrou
cbc392434c Add an option to disable building tests 2019-08-28 17:26:56 +02:00
Daan
afaf4924cb
Merge pull request #142 from jserv/clarify-ldpreload
Clarify LD_PRELOAD on dynamically-linked ELF
2019-08-27 16:40:21 -07:00
Jim Huang
61e4b83f36 Clarify LD_PRELOAD on dynamically-linked ELF
LD_PRELOAD is an environment variable that can be set to load ELF
shared objects before all others. Linux and BSD are known to fit.
This change also unifies the use of command line, ensuring the prefix
"> " prompt.
2019-08-28 06:44:40 +08:00
Daan
1b9c68667b
Merge pull request #140 from jserv/fix-rt-linkage
Link with -lrt for older glibc
2019-08-27 09:56:59 -07:00
daan
7972b64a82 resolve race on option initialization 2019-08-25 11:18:16 -07:00
Jim Huang
99e071cf2c Link with -lrt for older glibc
Quoted from Linux Programmer's Manual (2017-09-15):
    #include <time.h>
    int clock_gettime(clockid_t clk_id, struct timespec *tp);
    Link with -lrt (only for glibc versions before 2.17).

This patch adds additional checks for librt availability and append
target_link_libraries accordingly. librt is absent on macOS.

Fixed #139
2019-08-24 21:24:56 +08:00
Daan
7f29dec44a
Merge pull request #134 from kile0/kile/vs2019
Add VS solutions that can leverage the MSVC 2019 runtime
2019-08-21 16:00:03 -07:00
Kirsten Lee
6165177cb1 provide a set of solutions that use the vs2019 vcruntime 2019-08-20 16:19:16 -07:00
Daan
e2b4127a16
Merge pull request #129 from devnexen/linux_build_fix
linux build correction
2019-08-19 19:04:48 -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
cbc826beb5
Merge pull request #126 from JeanMiK/fix_C++_signature_of_mi_is_in_heap_region
Fix C++ signature of function mi_is_in_heap_region
2019-08-12 08:45:04 -07:00
JeanMiK
3f43cbe6a1 Fix C++ signature of function mi_is_in_heap_region
Original code did not compile with MI_USE_CXX=ON as function
mi_is_in_heap_region was declared noexcept through macro mi_attr_noexcept
but defined without specification, i.e. implicitly with noexception(false)

Just adding the macro in the definition is enough to fix the issue
(tested with gcc 8.3.5)
2019-08-12 12:43:01 +02:00
daan
a73daf1804 avoid mod operation in region allocation and limit extension 2019-08-11 08:54:32 -07:00
daan
756f4b2724 improve bit scanning code in region allocation 2019-08-11 08:48:19 -07:00
daan
b74f9b979f update documentation 2019-08-10 17:27:07 -07:00
Daan
6bc6628ad4
Update readme.md
Start documenting releases
2019-08-10 17:12:05 -07:00
Daan
f7ed954c7c
Update readme.md
Notes on dynamic overriding; document environment options
2019-08-10 17:07:40 -07:00
daan
74a5c17178 update order of options; make eager_region_commit 0 on windows by default v1.0.6 2019-08-10 15:44:55 -07:00
daan
2fee6f98d7 Merge branch 'master' into dev 2019-08-10 15:23:43 -07:00
daan
8ae2492eee fix arguments for the heap visitor function, issue #124 2019-08-10 10:14:01 -07:00
Daan
5b4c4ac959
Merge pull request #117 from devnexen/darwin_anon_monitor
darwin, tracking anonymous page lifetime.
2019-08-10 09:58:35 -07:00
daan
ccc78302bf fix double assignment (#125, by @ebudai) 2019-08-10 09:53:00 -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
70648635c6
Merge pull request #113 from jserv/fix-incorrect-path
Fix path name in documentation about macOS
2019-07-22 09:51:43 -07:00
Daan
80400c9946
Merge pull request #111 from jserv/avoid-strlen-in-loop
Avoid using strlen function in loop
2019-07-22 09:51:02 -07:00
Daan
cf8f46c263
Merge pull request #110 from jserv/options-branch-predict-hints
Add branch prediction hint for mi_option_get
2019-07-22 09:49:44 -07:00
Daan
ce241fd339
Merge pull request #106 from caixiangyue/fix-typo-719
fix typo
2019-07-22 09:44:07 -07:00
Daan
ade118e23d
Merge pull request #88 from jserv/gcc-builtin-umul-overflow
Use checked unsigned multiplication extension of GCC/Clang
2019-07-22 09:28:38 -07:00
Jim Huang
146a753d1e Fix path name in documentation about macOS 2019-07-22 04:45:40 +08:00
Jim Huang
c382c72cf2 Avoid using strlen function in loop 2019-07-21 22:30:42 +08:00
Jim Huang
1ffa48cc61 Add branch prediction hint for mi_option_get
mi_option_get is called frequently in stress tests, and the patch adds
extra hint to the compiler to emit instructions that will cause branch
prediction to favour the "likely" side of a jump instruction.
2019-07-21 21:42:00 +08:00
caixiangyue
a215049b4a fix typo 2019-07-19 16:23:14 +08:00
daan
f646cc925d add is_in_heap_region function 2019-07-17 15:37:36 -07:00
daan
8390c46503 disable JustMyCode debugging and whole program optimization as it seems to cause compiler errors sometimes v1.0.5 2019-07-15 17:38:16 -07:00
daan
72d8608333 avoid thread over-allocation on initial region allocations 2019-07-15 17:35:43 -07:00
daan
7ea9cf8d1f add region collection 2019-07-15 14:53:03 -07:00
daan
89bdcd43b2 fix bit search index 2019-07-15 14:33:15 -07:00
daan
08e0f14c2a document experimental options 2019-07-15 14:32:54 -07:00
Jim Huang
afd981d008 Use checked unsigned multiplication extension of GCC/Clang
Most processors have carry flags which they set on addition overflow, so
it is a good idea to access them whenever possible. Most of them also
have widening multiply instructions that can be used to detect overflow
of the non-widening version. Both GCC and Clang offer a way to detect an
overflow for security critical applications.

Reference:
  https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins
2019-07-16 05:28:59 +08:00
daan
ae1794a852 remove accidental test in cmake 2019-07-15 13:36:12 -07:00
daan
26ef67a45c fix visual studio project 2019-07-15 13:22:15 -07:00
daan
ea9dbd1036 set better default options for performance 2019-07-15 13:19:26 -07: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