zlacker

[parent] [thread] 1 comments
1. stagge+(OP)[view] [source] 2023-01-23 16:06:38
Not a dumb question. In theory, yes you want it to be aligned for performance reasons, and you can do this with one of the _aligned_malloc()/aligned_alloc() variants. In reality though, for any non-trivial algorithm, you may not be able to always enforce this.
replies(1): >>sylwar+53
2. sylwar+53[view] [source] 2023-01-23 16:17:42
>>stagge+(OP)
Usually you alloc some slack memory to be able to re-align on a cache line. But yeah, it seems better if the allocator can cleanely deal with that.
[go to top]