Commit Graph

469 Commits

Author SHA1 Message Date
daan 7b105c4810 improve layout of page for x64 2019-08-11 10:31:00 -07:00
daan dbe010f2d4 add huge and giant stats; increase bins 2019-08-10 20:51:37 -07:00
daan 737b05cc25 remove unused fields from OS thread local data 2019-08-10 17:50:27 -07:00
daan ed785253bf restructure the page flags to use explicit masks 2019-08-10 17:48:00 -07:00
daan 74a5c17178 update order of options; make eager_region_commit 0 on windows by default 2019-08-10 15:44:55 -07:00
daan 2fee6f98d7 Merge branch 'master' into dev 2019-08-10 15:23:43 -07:00
daan b1938530af fix comment 2019-08-09 14:31:45 -07:00
daan 7b16aa9302 remove accidental commit of different size bins experiment 2019-08-09 11:22:38 -07:00
daan 442bad9190 add good-fit for allowing larger blocks in smaller segments 2019-08-09 11:18:38 -07:00
daan 5e56b40fe6 improve page flags handling 2019-08-08 17:18:49 -07:00
daan 6596e970a5 move in_full and has_aligned into page threadid for a single test in mi_free 2019-08-08 15:23:18 -07:00
daan 55778d2fe4 improved stats 2019-08-08 11:36:13 -07:00
daan 189ad0f81d small optimizations, use bitwise aligne 2019-07-23 15:00:13 -07:00
daan 66b8c37ab3 ensure C++ compilation on windows 2019-07-23 15:00:13 -07:00
daan 219d46ff0c update test files and overriding 2019-07-23 15:00:13 -07:00
daan 6d9fab5af4 trailing id after #endif 2019-07-23 15:00:13 -07:00
Jim Huang b5e26bedb1 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-23 14:59:57 -07:00
Jim Huang 8dba36bcec 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-23 14:59:49 -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
daan 81a7ae33e7 fix order of options 2019-07-19 09:26:22 -07:00
daan 33aa5d92fa fix to overrides on windows 2019-07-18 21:20:18 -07:00
daan 93c8a5b693 full overriding api supported 2019-07-18 21:12:40 -07:00
daan 306a542336 add mimalloc-override header file and use C++ compilation with msvc 2019-07-18 20:28:29 -07:00
daan c228ecefd8 update for new dynamic direction on windows 64-bit 2019-07-18 18:59:32 -07:00
daan f646cc925d add is_in_heap_region function 2019-07-17 15:37:36 -07:00