--- id: VDE-004 status: open severity: medium category: compat date: 2026-07-27 reporter: ViewDesign --- # VDE-004: posix_memalign 在 MinGW 下缺失 ## 问题描述 posix_memalign() 是 POSIX 标准函数,MinGW (Windows GCC) 不提供此函数。performance_tuning.cpp 中直接调用 posix_memalign 导致链接失败。 ## 影响文件 - src/core/performance_tuning.cpp ## ViewDesign 侧 Workaround 通过 cmake/vde_gcc_compat.h 提供 MinGW 兼容实现(使用 _aligned_malloc)。 ## 建议修复方向 1. 使用 #ifdef _WIN32 + _aligned_malloc / _aligned_free 做平台抽象 2. 使用 C11 aligned_alloc 3. 使用 C++17 std::aligned_alloc --- *此文件由 ViewDesign 工程自动生成。处理完成后请更新 status 字段。*