You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
227 B

3 years ago
# 常见属性标记
3 years ago
## 强制内存对齐
```rust
#[repr(align(64))]
struct CachePadded(AtomicU64);
```
A data of alignment X is stored in memory at address multiple of X
https://doc.rust-lang.org/reference/attributes.html