I'm looking at come C code which seems to be allocating memory aligned to the page size:
_aligned_malloc( size, PAGESIZE )
where PAGESIZE
is a variable set to 4096. For the moment ignoring that page size could have a value different from 4096, I just want to know why one would want to align the memory allocation to the page size. What performance benefits does it provide, if any? Could it have any other purpose than performance?