我的书:
购买链接:
1.对齐memory,高效利用cache line,尽可能减少取数次数
/* |alignment| is the byte alignment and MUST be a power of two. */
```
struct AlignedPtr* AllocAlignedPointer(int alignment, int bytes) {
struct AlignedPtr* aligned_ptr;
unsigned long raw_address;
aligned_ptr = (struct AlignedPtr*) malloc(sizeof(*aligned_ptr));
a