[NSWI004] Data alignment

Petr Tuma petr.tuma at d3s.mff.cuni.cz
Sat Oct 24 17:48:11 CEST 2020


Hi,

alignment guarantees are primarily aimed at the application - when we say "heap blocks are aligned to 16B", this usually means "whatever pointer `malloc` returns is aligned to 16B".

Petr


On 24/10/2020 13:37, František Trebuňa wrote:
> Hi,
> regarding A1 and A2 in the graded quiz, if each block is aligned to 16B, does it mean that after the 8B header we need 8B padding, or is it simply that each header must be on an address aligned to 16B ?
> 
> Thank you,
> Trebuňa
> 
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
> 


More information about the NSWI004 mailing list