KVell + TableFS
static inline void nop() {
// volatile variable won't be optimized
for (volatile int i = 0; i < 1000; ++i) ;
}
Be careful to define struct when it will be stored on disk or will have much structure used in memory. Struct member's order maybe change struct's size, because compiler maybe add some paddings to make it aligned. Normally define struct members in size decreasing order will be good.
The Lost Art of Structure Packing
https://stackoverflow.com/a/10997489/7640227
- Mismatched free() / delete / delete []: 使用new[] 对应delete,或使用new但对应delete[]