5de74b543a
VDE-001 through VDE-013 all resolved in v1.0.1 ViewDesign workarounds can now be removed
32 lines
755 B
Markdown
32 lines
755 B
Markdown
---
|
|
id: VDE-004
|
|
status: fixed
|
|
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 字段。*
|