Commit graph

64 commits

Author SHA1 Message Date
daanx
a8b9f2878a better alignment test 2023-04-16 17:01:59 -07:00
daanx
4a52b7e4c4 use memzero_aligned 2023-04-16 12:32:43 -07:00
Daan Leijen
f58357548c restructure header files 2023-03-20 10:37:39 -07:00
Daan Leijen
9b110090b2 move threadid and mi_get_default_heap to primitives 2023-03-14 20:35:00 -07:00
Daan Leijen
82c85d1a13 fix valgrind mem for large alignment 2023-03-05 18:03:04 -08:00
Daan
056c2ce45b match track free size to tracked malloc size 2023-03-05 11:01:51 -08:00
Daan
3c906bde8b better track_free_size 2023-03-04 15:17:13 -08:00
Daan
6dcebdc303 fix sizes in memory tracking and padding for huge alignments 2023-03-04 14:49:02 -08:00
Johannes Schindelin
745a34f475 Fix whitespace
This mostly deletes trailing spaces.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-12-03 00:24:20 +01:00
Daan Leijen
10981ab122 add initial support for using mimalloc with address sanitizer support; use -DMI_ASAN=ON 2022-11-28 10:55:19 -08:00
Daan Leijen
604d4b259b fix assertion failure (issue #650) 2022-11-25 14:27:48 -08:00
Daan Leijen
969d8bc5fe make huge pages part of the regular page queues again 2022-11-22 20:56:35 -08:00
daan
2479d168ad decommit unused prefix of large aligned blocks 2022-11-07 16:41:40 -08:00
daan
2daec6c72f add more comments 2022-11-07 11:23:04 -08:00
daan
1f12c3dd12 remove MI_ALIGNMENT_MAX and add comments 2022-11-07 11:13:42 -08:00
Daan
f54e64365f fix assertions with incorrect block size for large alignments 2022-11-06 09:44:12 -08:00
daan
a200291ae5 further progress on removing aligned limit 2022-11-06 08:26:17 -08:00
daan
4b91ff760d initial working large alignment 2022-11-05 16:40:42 -07:00
daan
74117d329d fix realloc memory tracking in valgrind 2022-10-30 19:00:54 -07:00
daan
84c706508c fix false positives from valgrind in rptest 2022-10-30 10:45:51 -07:00
daan
eee7c40da5 updates to run valgrind on test-api 2022-10-29 11:43:09 -07:00
Daan Leijen
f76a678c04 fix mi_likely macro in debug build 2022-04-19 19:59:45 -07:00
Daan Leijen
7bc602ebb4 redefine mi_likely/mi_unlikely to work with C++ 20 [[likely]] attributes 2022-04-19 19:50:06 -07:00
Daan Leijen
d69d4c861f add zero parameter to primitive allocation to improve codegen for calloc etc 2022-04-19 18:32:35 -07:00
Daan Leijen
9d69e3ed06 fix further annotation warnings for vs2022 2022-04-19 17:36:04 -07:00
Daan Leijen
89090510bd update alignment tests 2021-12-18 11:11:44 -08:00
daan
faf2a7020c add extra alignment tests 2021-12-17 13:25:38 -08:00
daan
89f583a69b improve aligned allocation performance 2021-12-17 13:18:05 -08:00
daan
684c2c82a7 restrict max aligment boundary to prevent bug with segment determination (found by Matthew Parkinson). 2021-12-17 11:40:46 -08:00
Daan Leijen
4ba32c3160 Revert "make all includes relative"
This reverts commit 1feb6123d9.
2021-06-07 16:47:57 -07:00
Daan Leijen
1feb6123d9 make all includes relative 2021-06-06 20:31:36 -07:00
Jim Huang
5940d3bcce Bump copyright date
Each source file has been changed according to relevant Git activities.
2021-04-24 16:35:11 +00:00
Daan Leijen
35c1fc2be9 limit memcpy as rep stosb to windows where the cpu supporst FSRM; add mi_memcpy_aligned for machine-word aligned copy. see issue #201 and pr #253 2021-01-30 14:33:46 -08:00
Haneef Mubarak
429025634e
resolve #201 with a platform-selective REP MOVSB implementation 2020-05-26 16:04:28 -07:00
daan
74986c1dd1 weaken aligmenment assertion (issue #245) 2020-05-19 09:56:37 -07:00
Daan Leijen
c9ffe30513 weaken alignment requirement to not need to be a multiple of sizeof(void*); see #246 2020-05-18 10:17:58 -07:00
daan
f2ac272baa strengthen alignment check for memalign and aligned_alloc 2020-02-17 09:59:11 -08:00
daan
16ebb70e4c strengthen aligment guarantee (issue #206) (reverse commit 4531367) 2020-02-17 09:15:48 -08:00
daan
f42b8526d0 fix wrong __declspec(restrict) and __attribute__((malloc)) attributes on reallocation functions 2020-02-13 10:36:39 -08:00
daan
feb0699bcb fix aligment check when padding is enabled 2020-02-02 22:01:04 -08:00
daan
f0dc6e7e42 add extra alignment test 2020-02-02 16:21:06 -08:00
daan
68112a2751 better padding implementation, more precise statistics 2020-01-31 20:34:24 -08:00
daan
4531367de2 fix padding check for aligned allocation; improve perf for small aligned allocations 2020-01-31 13:20:02 -08:00
daan
dc58388968 Add ability to register custom error function called on various error conditions; including ENOMEM 2020-01-17 19:59:55 -08:00
daan
5de851a84d update page_flags to have more portable definition 2019-10-17 16:48:16 -07:00
Johannes Schindelin
5bd8ea2e4f Repeat mi_decl_allocator in functions' definitions
Quite a few functions are declared with that attribute, and VS 2019
complains if the definition does not repeat it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-17 20:43:18 +02:00
daan
24777f6a91 limit aligned allocation to power-of-two alignment 2019-09-11 17:49:28 -07:00
daan
050e7cedf4 roll back commit 0aec6d93 on alignment >= size as it breaks assertions in tensorflow 2019-09-11 15:48:44 -07:00
daan
0aec6d9302 don't align to sizes greater than than the allocation size 2019-09-07 12:01:54 -07:00
daan
b241910810 don't allocate more than PTRDIFF_MAX on aligned allocations 2019-09-07 11:52:21 -07:00