daan
8ef37e6c0b
update atomic exchange memory model annotations for unix
v1.0.2
2019-07-09 14:56:43 -07:00
daan
cf8815854c
fix cmake issues with OBJECT install
2019-07-09 11:32:24 -07:00
daan
129149977d
Merge branch 'dev' into dev-exp
2019-07-08 17:45:04 -07:00
daan
76023ca45f
fix path max in realpath on unix (pr #69 )
2019-07-08 17:43:10 -07:00
daan
8203f3dcfa
add full heap aligned allocation api (issue #52 ); remove rezalloc (issue #63 ); add mi_version
2019-07-08 17:17:07 -07:00
daan
5f607e0f58
update documentation
2019-07-08 17:15:34 -07:00
daan
4d22ff6d03
Merge branch 'dev' into dev-exp
2019-07-08 15:45:50 -07:00
daan
d656f3e339
merge with master
2019-07-08 15:45:37 -07:00
daan
493dfc4b82
merge with dev
2019-07-08 15:42:42 -07:00
daan
fc35f6069a
Add NO_SYSTEM_ENVIRONMENT_PATH and example of linking with the object file; pr #67
2019-07-08 13:37:41 -07:00
daan
56bdb2c2f3
add more const declarations (pr #79 )
2019-07-08 12:00:59 -07:00
daan
7f0137a617
Fix compilation error with MSVC C++
2019-07-07 21:59:53 -07:00
daan
7e743dfb58
fix C++ compilation warnings with VisualStudio 2017
2019-07-07 18:52:12 -07:00
daan
c3528203b5
fix compilation with C++, fix overrides in C++ to adhere to the spec (issue #26 )
2019-07-07 18:11:21 -07:00
daan
dd59a917ce
Expose mi prefixed public standard implementations of various posix, unix, and c++ allocation functions. See issue #75
2019-07-07 13:44:33 -07:00
David Carlier
a192d6893e
initial support of 2MB pages on Mac
2019-07-05 20:05:04 +01:00
daan
b40fe5178a
fix static object linking
2019-07-04 14:56:58 -07:00
daan
983c96a238
Merge branch 'dev' into dev-exp
2019-07-04 14:46:53 -07:00
daan
5ff037f8f8
add capability to override multiple entry points in windows dynamic override; and stop patching msvcrt, just crtbase
2019-07-04 12:06:15 -07:00
daan
74dc95c1d6
fix crash triggered in release mode with windows dynamic overriding
2019-07-04 12:04:56 -07:00
daan
3039dbfcdd
for windows dynamic override, add standard api override and stop patching new/delete (for now)
2019-07-04 09:29:33 -07:00
daan
6abdc5f5a3
do not enable verbose by default in the debug build; add trace messages for verbose level 2
2019-07-04 09:28:22 -07:00
daan
069208b184
Possible fix to windows dynamic override calling register onexit directly
2019-07-03 19:47:44 -07:00
Daan
1125271c27
Merge pull request #74 from ErnyTech/patch-1
...
Suppressed the new GCC 9 -Wmissing-attributes warnings
v1.0.0
show
2019-07-03 18:52:55 -07:00
daan
24feb5e305
update Visual Studio project to not use _MBCS by default, issue #59
2019-07-03 18:49:48 -07:00
daan
663769c512
merge dev branch
2019-07-03 18:12:55 -07:00
Ernesto Castellotti
8c2f52dee8
Suppressed the new GCC 9 -Wmissing-attributes warnings
...
With the new release of the GCC 9 compiler the operation of -Wmissing-attributes warnings has also been extended to aliases: this causes a warnings if the alias has less attributes than its target.
This warnings does not actually indicate a problem in the mimalloc code and you could safely ignore it by adding "-Wno-missing-attributes" to the CFLAGS, however I was not going to use a "hack" to hide the warning when compiling alloc-override .c
So this patch solves the problem simply by using an attribute (present only in GCC> = 9) that copies the attributes of another function, since this attribute is exclusive only for GCC 9 (or later) I had to use a simple precompiler instruction to add the "copy" attribute only with GCC 9.
2019-07-04 00:21:15 +02: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
7b4f3591f0
fix dynamic override when both msvcrt and ucrtbase are loaded in any order using priorities
2019-07-03 14:23:30 -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
c465f6ae35
Merge branch 'master' into dev
2019-07-02 16:32:52 -07:00
daan
e2d3fefc1d
Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
2019-07-02 16:28:47 -07:00
Daan
eee7601206
Merge pull request #43 from myd7349/cmake-build-options
...
fix object file install error
2019-07-02 16:28:30 -07:00
Daan
875ecbd21e
Merge pull request #68 from ObiWahn/make-includes-available
...
make includes available for projects that add mimalloc as subdirectory
2019-07-02 16:26:04 -07:00
daan
42efe51184
Merge branch 'master' into dev
2019-07-02 16:22:55 -07:00
Daan
f06931ba7e
Merge pull request #65 from devnexen/mi_mmap_prot_max_support
...
Using BSD new PROT_MAX mmap to block page address wider promotions
2019-07-02 16:21:13 -07:00
daan
b0ceb4a44c
forward strdup, strndup, and realpath too
2019-07-02 15:56:01 -07:00
daan
b3f533167b
Merge branch 'master' into dev
2019-07-02 15:52:26 -07:00
Daan
665b7324a4
Merge pull request #61 from jserv/indent-override
...
Make forwarding macros friendly to indentation or style checkers
2019-07-02 15:51:42 -07:00
daan
7dc3a5a18e
Merge branch 'master' into dev
2019-07-02 15:44:48 -07:00
daan
04b1fd7b8d
Fix macro spelling
2019-07-02 12:57:12 -07:00
daan
4326bda2c7
Fix main heap cookie on macOS
2019-07-02 12:53:53 -07:00
daan
aeff1db32b
Fixing interpose on macOS
2019-07-02 12:49:28 -07:00
Daan
825d00a001
Merge branch 'master' into indent-override
2019-07-02 09:03:32 -07:00
Daan
ea6601c9cc
Merge pull request #62 from jserv/correct-linux-wording
...
Clarify the comment about Linux distributions
2019-07-02 09:01:24 -07:00
Daan
39956aa71f
Merge pull request #64 from 4ge32/master
...
fix a environment variables name
2019-07-02 08:53:16 -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
Jan Christoph Uhde
408b76d103
make includes available for projects that add mimalloc as subdirectory
2019-07-02 11:12:04 +02:00
David Carlier
bed746d7d6
Using BSD new PROT_MAX mmap to block page address wider promotions
2019-07-01 06:56:16 +00:00
Fumiya Shigemitsu
ed5cdba634
fix a environment variables name
...
Some documents explain passing MIMALLOC_STATS=1 to print
statistics, though it handles as mimalloc_show_stats in the actual
code. According to the code, change the name MIMALLOC_STATS to MIMALLOC_SHOW_STATS.
2019-06-30 14:20:23 +09:00
Jim Huang
2347a65fe0
Clarify the comment about Linux distributions
...
Red Hat Linux was discontinued by Red Hat in 2003. It would make sense
to address glibc-based Linux distributions rather than Red Hat Linux.
Reference: https://en.wikipedia.org/wiki/Red_Hat_Linux
2019-06-30 01:17:13 +08:00
Jim Huang
329a494783
Make forwarding macros friendly to indentation or style checkers
...
Indention programs such as clang-format usually rely on the occurrence
of statement terminator, otherwise they are likely confused. The revised
forwarding macros do not contain semicolons character, which is friendly
to indentation or style checkers.
2019-06-30 01:06:13 +08:00
myd7349
a5b22af7ec
fix object install error
2019-06-29 21:53:47 +08: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
Daan
38eb0a9449
Update readme.md
...
Add Azure pipelines badge
2019-06-27 13:43:23 -07:00
daan
ae47a2b13e
Add initial testing file, test target, and readme about testing, issue #10 , pr #57
2019-06-27 13:36:19 -07:00
daan
4c87643c29
add check to see if we truly override the system malloc
2019-06-27 13:34:50 -07:00
daan
d2a2508af3
fix overly restrictive assertion
2019-06-27 13:34:14 -07:00
daan
1e636c45da
add check for overflowing size allocation
2019-06-27 13:33:28 -07:00
daan
12d756e7b2
fix page count of heap when absorbing
2019-06-27 13:32:44 -07:00
daan
36826a96c9
add power-of-two check to posix_memalign, pr #56
2019-06-27 13:29:00 -07:00
daan
ec2a8f387b
strengthen alignment check to be void* aligned
2019-06-27 13:27:53 -07:00
Daan
5dfced26c2
Merge pull request #49 from Benzodia/master
...
Remove underscore prefixes to match c lanuguage standard
2019-06-26 08:44:25 -07:00
Daan
fcb338a21b
Merge pull request #51 from Qix-/patch-1
...
is it -> as it
2019-06-26 08:43:02 -07:00
Qix
45b254f08d
is it -> as it
2019-06-26 12:53:46 +02:00
Julian Fang
c19d3a27a8
Remove underscore prefixes to match c lanuguage standard
2019-06-26 12:57:13 +08:00
daan
fac0d4b409
fix passing void as argument
2019-06-25 20:06:34 -07:00
daan
b3ce61c408
fix atomic statistics counter increase
2019-06-25 20:05:43 -07:00
daan
654bcd7049
Merge branch 'master' into dev
2019-06-25 19:57:45 -07:00
daan
9ba53d3e2b
fix missing prototype for heap_alloc_small
2019-06-25 19:57:21 -07:00
Daan
1713c37f9d
Merge pull request #28 from jserv/gcc-visibility
...
Avoid unnecessary symbol exposure with ELF-based systems
2019-06-25 19:54:28 -07:00
daan
cae02b4676
Merge branch 'master' into dev
2019-06-25 19:45:59 -07:00
Daan
4c1d848d88
Merge pull request #38 from dscho/azure-pipelines
...
Set up CI (Azure Pipelines)
2019-06-25 19:43:36 -07:00
Daan
f5d1170ae7
Merge pull request #41 from jedisct1/c-prototypes
...
fn() is not a valid C prototype
2019-06-25 19:38:44 -07:00
Daan
901413fadd
Merge pull request #44 from jserv/fix-conditional-build
...
Correct the use of MI_DEBUG by conditional build
2019-06-25 19:35:26 -07:00
Jim Huang
47e822c70f
Correct the use of MI_DEBUG by conditional build
...
MI_DEBUG is a macro rather than a variable.
2019-06-25 21:59:20 +08:00
Frank Denis
59a714725b
Read-only strings should be const char *
2019-06-25 12:19:36 +02:00
Frank Denis
236cd2e65c
fn() is not a valid C prototype
2019-06-25 12:16:36 +02:00
Johannes Schindelin
b2706a05bb
Set up CI with Azure Pipelines
...
This sets up an Azure Pipeline to build the library, publishing
the artifacts for convenience.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-06-25 10:24:44 +02:00
Jim Huang
256eb97849
Avoid unnecessary symbol exposure with ELF-based systems
...
GCC's default visibility is "public" but can be changed to
"hidden" with the argument "-fvisibility=hidden".
Tested with x86_64 / Ubuntu Linux 18.04 LTS:
[before]
$ nm -g -C libmimalloc.so | grep "T " | wc -l
142
[after]
$ nm -g -C libmimalloc.so | grep "T " | wc -l
93
This patch does not change the build on macOS.
2019-06-25 10:00:22 +08:00
daan
c6c1d5fffd
update docs to new MI_ prefixed build options
2019-06-24 19:00:16 -07:00
daan
4ea0e2b4ba
Merge branch 'master' into dev
2019-06-24 18:54:27 -07:00
daan
91cb4cee8a
use MI_ prefix for all options to better support subdirectory cmake, issue #3
2019-06-24 18:54:03 -07:00
Daan
30b8624d6e
Merge pull request #22 from myd7349/win32-cmake-patch
...
Fix CMake configuration on Windows
2019-06-24 18:19:49 -07:00
daan
c1226611c6
Merge branch 'master' into dev
2019-06-24 18:13:04 -07:00
Daan
8bb8852d4f
Merge pull request #17 from jserv/macos-rebranding
...
Apple rebrands "OS X" as "macOS"
2019-06-24 18:12:06 -07:00
Daan
e86935e108
Merge pull request #18 from jserv/fix-typo
...
Fix typo
2019-06-24 18:09:26 -07:00
daan
cc951affac
fix compilation on older mac systems without CLOCK_MONOTONIC
2019-06-24 18:06:46 -07:00
daan
a16d95375f
remove lock code from atomics (as it is unused)
2019-06-24 17:54:41 -07:00
Daan
8e244f6616
Merge pull request #33 from dscho/fix-prototypes
...
Use `void` in the signatures of parameter-less functions
2019-06-24 17:49:50 -07:00
Daan
460ac23307
Merge pull request #34 from jserv/use-clock_gettime
...
Use clock_gettime() instead of timespec_get()
2019-06-24 17:48:46 -07:00
myd7349
b7c8d8f007
Fix CMake configuration on Windows
...
- Do not define MI_MALLOC_OVERRIDE when built as a static library
- Use different output names for shared lib and static lib
2019-06-25 08:02:17 +08:00
daan
f36149a9ac
fix format specifiers
2019-06-24 12:20:32 -07:00