in Linux , use posix_memaligned ,

in winx use aligned_alloc  ,  but this only work at c++11 ,

maybe c++14 will support , my g++ 4.8.1 still can not recognize this function !!!!

 

http://en.cppreference.com/w/c/memory/aligned_alloc

 

http://stackoverflow.com/questions/227897/solve-the-memory-alignment-in-c-interview-question-that-stumped-me/227900#227900

 

創作者介紹
創作者 hedgezzz 的頭像
hedgezzz

hedgezzz的部落格

hedgezzz 發表在 痞客邦 留言(0) 人氣()