Jon*_*rop 5 c++ memory-management alignment
我有一个用C++编写的小型原型程序,在Linux下运行,使用该memalign函数来分配与页面等边界对齐的区域.在Visual C++中是否有等效的功能?
memalign
Eug*_*and 5
你正在寻找_aligned_malloc.请注意,必须使用释放内存_aligned_free,并且该对齐限制为2的幂.
_aligned_free
如果您需要更多的灵活性,那么手动编写自己malloc的alignment + bytes内存块的解决方案并不难.
malloc
alignment + bytes
归档时间:
14 年,10 月 前
查看次数:
5474 次
最近记录: