Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
fix(windows): keep aligned allocations on mimalloc
News25d08258e567
diff --git a/src/foundation/compat_thread.c b/src/foundation/compat_thread.cindex 94af9f812..b86a7f3fb 100644--- a/src/foundation/compat_thread.c+++ b/src/foundation/compat_thread.c@@ -2,7 +2,7 @@* compat_thread.c — Portable thread, mutex, and aligned allocation.** POSIX: thin wrappers around pthreads and posix_memalign.- * Windows: CreateThread, CRITICAL_SECTION, _aligned_malloc.+ * Windows: CreateThread, CRITICAL_SECTION, aligned allocation.*/#include "foundation/mem_events.h"#include "foundation/constants.h"@@ -279,12 +279,20 @@ void cbm_mutex_destroy(cbm_mutex_t *m) {#ifdef _WIN32int cbm_aligned_alloc(void **ptr, size_t alignment, size_t size) {+#if defined(CBM_MEM_GLOBAL_OVERRIDE) && CBM_MEM_GLOBAL_OVERRIDE+ *ptr = mi_malloc_aligned(size, alignment);+#else*ptr = _aligned_malloc(size, alignment);+#endifreturn *ptr ? 0 : -1;}void cbm_aligned_free(void *ptr) {+#if defined(CBM_MEM_GLOBAL_OVERRIDE) && CBM_MEM_GLOBAL_OVERRIDE+ mi_free(ptr);+#else_aligned_free(ptr);+#endif}#else /* POSIX */