603 Commits

Author SHA1 Message Date
Mattias Jansson
feb43aee0d Fix Windows build 2025-10-26 19:21:49 +01:00
Mattias Jansson
490e34d9f5 Use packaging instead of distutils in msvc toolchain enumerator 2025-10-26 15:31:34 +01:00
Mattias Jansson
ff6608b027 Handle commit failures with callback and return null 2025-10-26 15:27:35 +01:00
Mattias Jansson
44bfb525d0 Fix validate args impl 2025-10-26 14:48:21 +01:00
Mattias Jansson
620dd00980 Add heap stats and update global status 2025-10-26 14:33:56 +01:00
Vaughn Nugent
dea263ba02 Windows updates and Visual Studio fixes (#360)
* fix: lzcnt intrinstic msvc/clang update
* build: require c11 and enable /experimental:c11atomics for stdatomic support
* build: update MSVC to v143
* feat: Enable msvc WIN32_LEAN_AND_MEAN

Added a definition for WIN32_LEAN_AND_MEAN before the inclusion of the windows.h header file to enable minimal msvc features. Also calms the winioctl c4668 warnings since the headers are no longer being included.
2025-10-25 15:21:34 +02:00
Ryan Houdek
b0ce72c291 Fix build on arm64ec (#362) 2025-10-25 14:32:20 +02:00
Mattias Jansson
6b34d95691 Fix missing init when first call is a huge alloc 2025-08-10 14:33:35 +02:00
Catty Steve
66fd705a81 feat: add support for LoongArch (#353)
__builtin_thread_pointer is working on LoongArch.
2025-05-26 19:57:44 +02:00
Catty Steve
89e9a46618 fix: use shlex than pipes to support python3.13 (#352) 2025-05-26 19:56:40 +02:00
Mattias Jansson
979092cf45 Switch to 0BSD + UNLICENSE 2025-03-15 12:35:27 +01:00
Mattias Jansson
bcd8080509 Check compiler level for builtin thread pointer 2025-03-15 12:19:53 +01:00
David CARLIER
56b41c36a3 fix _Static_assert/Thread_local -Wpre-c11-compat build error with clang. (#339) 2025-03-15 12:10:00 +01:00
Trithek
7e1dcac7f0 GetLargePageMinimum is only available on certain flavors of Windows - we'll default to 2MB on the ones that don't support the call (#348) 2025-03-15 12:09:26 +01:00
Mattias Jansson
d313031c6b Update Android TLS model check 2025-03-15 12:04:59 +01:00
Mattias Jansson
8f768ab93e Clean up thread ID 2025-03-15 11:58:45 +01:00
Mattias Jansson
19a9daa6a1 Use acquire release memory semantics for weak memory model support 2025-03-15 11:50:52 +01:00
Mattias Jansson
60d76b7eb8 Correct positional arguments for allocation attrib of rpmalloc_heap_aligned_calloc 2025-01-11 17:53:48 +01:00
Mattias Jansson
2162002191 Avoid issues with has builtin macro 2025-01-11 17:47:47 +01:00
Mattias Jansson
20844207cf Restore default TLS model 2025-01-11 17:34:59 +01:00
Trout Zhang
b443c9dc5f Set TLS model on Android depending on target sdk (#347) 2025-01-11 16:40:16 +01:00
Mattias Jansson
d60ad1f974 Improve crossthread free (#336)
* Use correct name for retain count
* Introduce a heap thread free list
* New clang warnings and formatting
* Use builtin thread pointer and set correct virtual alloc flags
* Tune down page retain
* Retain per page type
2024-05-18 22:55:38 +02:00
Mattias Jansson
7993a04a32 adding option to disable thp on linux/android 2024-05-18 11:42:56 +02:00
David Carlier
565e92b6cc adding option to disable thp on linux/android. 2024-05-17 22:12:25 +01:00
Mattias Jansson
955f44b6c3 Avoid specifying a tls model 2024-05-12 21:23:46 +02:00
Mattias Jansson
f92bf85224 Clang compat 2024-05-12 21:14:44 +02:00
Mattias Jansson
137bc8451c Avoid initial page commit on Windows 2024-04-20 15:39:40 +02:00
Mattias Jansson
6b3ebcb11d Promote rewrite branch to develop 2024-04-01 23:18:13 +02:00
Mattias Jansson
2dd697f69a Merge branch 'develop' into mjansson/rewrite 2024-04-01 09:25:39 +02:00
Mattias Jansson
e562595f2c Merge branch 'develop' into mjansson/rewrite 2024-04-01 09:21:46 +02:00
Mattias Jansson
ba9b001dd3 Use __yield on ARM64 Windows 2024-04-01 09:04:17 +02:00
Mattias Jansson
d8c324da19 Update CHANGELOG 2024-04-01 09:02:11 +02:00
Mattias Jansson
5932457ebd Windows ARM64 support 2024-04-01 08:45:23 +02:00
FujiZ
a9904521c3 perf: check global cache before extracting from reserved memory (#323)
The allocator should check the global cache for an available span
before extracting a span of memory from the reserved memory to avoid
cache bloating. Besides, extracting from reserved memory eagerly may
also increase the degree of memory fragmentation.
2024-03-31 20:32:55 +02:00
Mattias Jansson
ef179ff86d Fix issue where pages could end up on default heap 2024-01-25 23:27:35 +01:00
Mattias Jansson
b41aa177fc Properly release span cache on free all (#321) 2023-12-25 09:24:26 +01:00
Mattias Jansson
3953ffd04b Add _base variants of Windows Heap API 2023-12-22 23:41:08 +01:00
taigacon
240f482903 Add _base variants of Windows Heap API (#317) 2023-12-22 23:39:47 +01:00
Mattias Jansson
64e3a3ccd7 Fix Windows global init proc to return 0 2023-12-22 23:39:23 +01:00
Mattias Jansson
2b0639406a Merge branch 'mjansson/rewrite' of https://github.com/mjansson/rpmalloc into mjansson/rewrite 2023-12-22 23:12:21 +01:00
Mattias Jansson
8800e19d1c Split the heap get page for better codegen 2023-12-22 23:12:15 +01:00
Mattias Jansson
839925e52d Avoid unsafe buffer warning on clang 16+ 2023-12-22 22:24:02 +01:00
Mattias Jansson
e6fe78ecf8 Avoid unsafe buffer warning on clang 16+ 2023-12-22 22:16:11 +01:00
Mattias Jansson
395b352a3e Skip mprotect calls on decommit/commit 2023-10-30 18:13:58 +01:00
Mattias Jansson
857a088914 Skip mprotect calls on decommit/commit 2023-10-30 18:10:29 +01:00
Mattias Jansson
b1b0ffb833 Cleanups 2023-10-30 17:35:46 +01:00
Mattias Jansson
4ec0455c98 Increase alloc test to force decommit/recommit pages 2023-10-30 09:24:49 +01:00
Mattias Jansson
0213fab739 Add some zalloc tests 2023-10-30 09:46:44 +01:00
Mattias Jansson
2f35e67c97 Add missing static decl 2023-10-25 12:23:27 +02:00
Mattias Jansson
31966e5070 Improved codegen in free path 2023-10-22 14:56:07 +02:00