malloc返回地址的对齐问题

http://man7.org/linux/man-pages/man3/malloc.3.html

RETURN VALUE         top

       The malloc() and calloc() functions return a pointer to the allocated
       memory, which is suitably aligned for any built-in type.

因为占内存最多的变量类型为double和int64,都是8字节。

那么,malloc返回的地址都是8字节对齐的吗?

对于lwip的mem_alloc()也是都是8字节对齐吗?

https://stackoverflow.com/questions/8752546/how-does-malloc-understand-alignment

原文地址:https://www.cnblogs.com/yanhc/p/10924223.html