summaryrefslogtreecommitdiff
path: root/include/mimalloc-internal.h
AgeCommit message (Collapse)Author
2021-11-09wip: increase commit mask resolutiondaan
2021-11-04Merge branch 'dev' into dev-sliceDaan
2021-11-04add noexcept attributes to improve mi_free codegenDaan
2021-11-02merge from devDaan
2021-11-02add mi_decl_externc, nice layoutDaan
2021-10-28fix spurious build warning with overflow builtinsdc
2021-10-21Merge branch 'dev' into dev-sliceDaan
2021-10-21Rename _os_random_weak to _mi_os_random_weakChristian Heimes
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-19merge from devDaan
2021-10-19Merge pull request #420 from hankluo6/typoDaan
Fix typo
2021-10-19Merge branch 'dev' into dev-sliceDaan
2021-10-19Merge pull request #467 from tiran/strict_prototypesDaan
Fix strict function prototype warnings
2021-10-19Fix strict function prototype warningsChristian Heimes
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-18merge from devDaan Leijen
2021-10-01Merge branch 'dev' of https://github.com/microsoft/mimalloc into devDaan Leijen
2021-10-01Merge branch 'dev' into dev-sliceDaan Leijen
2021-10-01update wasm support with emscripten compilation; now using sbrk instead of ↵Daan Leijen
wasm_memory_grow
2021-06-24Eliminate preprocessor warnings due to undefined "__GNUC__" with ClangCLJim Huang
When building some code against mimalloc with C inside Visual Studio with ClangCL, the compiler complains about __GNUC__ being undefined. Reported by Mojca Miklavec. Close #422
2021-06-21fix typohank
2021-06-17merge from devDaan Leijen
2021-06-17fix for #414 making numa node count atomicDaan Leijen
2021-06-17merge from devDaan Leijen
2021-06-17fixes for M1; disable interpose use zones; fix pedantic warningsDaan Leijen
2021-04-28merge from devDaan Leijen
2021-04-24Bump copyright dateJim Huang
Each source file has been changed according to relevant Git activities.
2021-04-22Merge pull request #384 from kdrag0n/fix-android-thread-idDaan
Fix thread ID getter on Android ARM/AArch64
2021-04-21Revise the use of macOS predefined macroJim Huang
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-07Fix thread ID getter on Android ARM/AArch64Danny Lin
Android's Bionic libc stores the thread ID in TLS slot 1 instead of 0 on 32-bit ARM and AArch64. Slot 0 contains a pointer to the ELF DTV (Dynamic Thread Vector) instead, which is constant for each loaded DSO. Because mimalloc uses the thread ID to determine whether operations are thread-local or cross-thread (atomic), all threads having the same ID causes internal data structures to get corrupted quickly when multiple threads are using the allocator: mimalloc: assertion failed: at "external/mimalloc/src/page.c":563, mi_page_extend_free assertion: "page->local_free == NULL" mimalloc: assertion failed: at "external/mimalloc/src/page.c":74, mi_page_is_valid_init assertion: "page->used <= page->capacity" mimalloc: assertion failed: at "external/mimalloc/src/page.c":100, mi_page_is_valid_init assertion: "page->used + free_count == page->capacity" mimalloc: assertion failed: at "external/mimalloc/src/page.c":74, mi_page_is_valid_init assertion: "page->used <= page->capacity" Add support for Android's alternate TLS layout to fix the crashes in multi-threaded use cases. Fixes #376.
2021-02-02Merge branch 'dev' into dev-sliceDaan Leijen
2021-02-02build fix for Apple M1 (issue #354 and pr #356)Daan Leijen
2021-02-01Merge branch 'dev' into dev-sliceDaan Leijen
2021-02-01fix getting the unique thread id on the Apple M1, see issue #354.Daan Leijen
2021-01-30merge from devDaan Leijen
2021-01-30limit memcpy as rep stosb to windows where the cpu supporst FSRM; add ↵Daan Leijen
mi_memcpy_aligned for machine-word aligned copy. see issue #201 and pr #253
2021-01-29merge from devDaan Leijen
2021-01-29possible fix for aligment warning (issue #341)Daan Leijen
2021-01-29ensure memcpy with rep stosb is only used on windowsDaan Leijen
2021-01-29Merge pull request #253 from haneefmubarak/memcpy-rep-movsb-windows-201Daan
resolve #201 with a platform-selective REP MOVSB implementation
2021-01-28Merge branch 'dev' into dev-sliceDaan Leijen
2021-01-28add comment on use of tpidrro_el0 on macOSDaan Leijen
2021-01-28Use APPLE instead of MACHUwe L. Korn
2021-01-22Use __APPLE__ instead of __MACH__Uwe L. Korn
2020-12-30Use tpidrro_el0 for thread local storage in macOS-arm64Uwe L. Korn
Fixes #343
2020-12-15merge from devDaan Leijen
2020-12-15update override on macOS with interpose of malloc_default_zone (issues #313)Daan Leijen
2020-12-10merge from devDaan Leijen
2020-12-10Merge pull request #323 from devnexen/dfbsd_build_fixDaan
DragonFly support fix (for 5.8.x and forward).
2020-12-10Merge pull request #322 from Kokokokoka/x32_patchDaan
fix for x32 builds
2020-10-22DragonFly support fix (for 5.8.x and forward).David Carlier
The pthread slot approach is somewhat buggy (pretty visible with the stress unit test which segfault more or less randomly, but the stats never show up). Using the default approach instead, the test passes eventough it s relatively slow (e.g 1.5 sec on FreeBSD vs 4.5 on DragonFly with same machine).
2020-10-19fix for x32 buildsVasya B