What is the padding logic when memory is used?
I have some objects, all 24 bytes long on an X64 machine. I would have expected that the objects are placed next to each other both in stack and heap, as 24 is dividable by 8 (bytes = 64 bits), but what I see in memory is that they are placed 32 bytes from each other adding an extra 8 byte to pad.
Similarly, when I have pointers (8 bytes) right after each other, I would have thought that they are right after each other again, but what I see is that they are 16 bytes apart.
Why is that that on a 64 bit computer padding is done to 128 bits?