01:198:211 Lecture Notes - Lecture 13: Edx, Memory Address
Document Summary
Cs211-lecture 13-a lower level look at arrays and structs: in review, arrays are laid out as contiguous blocks of memory. And you would need to store the found pointer in some other variable, say. %ebx: next, we repeat for the next inner array using the found pointer, essentially repeating the first step. You access the value i by dereferencing the initial pointer to the struct. You access the array a by adding the size of i to the initial pointer, and dereferencing the elements starting there. Initial address and structure length must be multiples of k: rules for alignment. 2 bytes: lowest 1 bit of address must 02, address must be a multiple of 2 away from beginning of struct. 4 bytes: lowest 2 bits of address must be 002, address must be a multiple of 4 away from beginning of struct.