On Tue, Oct 24, 2017 at 9:50 PM, Liu Hao <lh_mouse@xxxxxxx> wrote: > On 2017/10/24 23:55, Jonathan Wakely wrote: >> >> On 23 October 2017 at 15:55, David Gressett wrote: >>> >>> ... >> If that code still doesn't build we need a bug report. > > The attached program would not compile if the first line were uncommented, > which looks like a bug to me. > > ``` > // #include <intrin.h> > #include <malloc.h> > #include <stdio.h> > > int main(void){ > void *ptr; > > ptr = _aligned_malloc(1000, 32); > printf("ptr = %p\n", ptr); > _aligned_free(ptr); > } I believe <intrin.h> is part of the Windows SDKs. They are probably not on-path if they are installed. According to MSDN, _aligned_malloc and _aligned_free are from <malloc.h>. See https://msdn.microsoft.com/en-us/library/8z34s9c6.aspx You might have better luck calling Intel's _mm_malloc and _mm_free for the aligned allocations. They are more portable across Windows platforms. Jeff