Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 24428

re: If you're going to write your own allocator, you need to respect the MEMORY_ALLOCATION_ALIGNMENT

$
0
0

This is one reason I would prefer to work on a CPU where all misaligned access faulted.  Less room for ambiguity if your thing faults all the time.

(Although, I'd argue that altering the low bits of a pointer as metadata is kind of asking for this type of bug.  The only place where I would not frown on this in a code review is where hardware interfaces require it.  x86 page tables come to mind.)


Viewing all articles
Browse latest Browse all 24428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>