compilers
play

Compilers Alignment Alex Aiken Alignment Most modern machines are - PowerPoint PPT Presentation

Compilers Alignment Alex Aiken Alignment Most modern machines are 32 or 64 bit 8 bits in a byte 4 or 8 bytes in a word Machines are either byte or word addressable Alex Aiken Alignment Data is word aligned if it begins at a


  1. Compilers Alignment Alex Aiken

  2. Alignment • Most modern machines are 32 or 64 bit – 8 bits in a byte – 4 or 8 bytes in a word – Machines are either byte or word addressable Alex Aiken

  3. Alignment • Data is word aligned if it begins at a word boundary • Most machines have some alignment restrictions – Or performance penalties for poor alignment Alex Aiken

  4. Alignment • Example: A string “ Hello ” Takes 5 characters (without a terminating \0) • To word align next word, add 3 “ padding ” characters to the string • The padding is not part of the string, it’s just unused memory Alex Aiken

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend