What does posix_memalign/memalign do

后端 未结 7 983
醉梦人生
醉梦人生 2020-12-04 06:30

I\'m trying to understand what functions memalign() and posix_memalign() do. Reading the available documentation didn\'t help.

Can someone

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 07:08

    How does it work is implementation dependent. The purpose of the function is to give you an n-bytes aligned memory block (the start address of the block is a multiply of n).

提交回复
热议问题