Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 718 Bytes

Memory Arrays.md

File metadata and controls

22 lines (19 loc) · 718 Bytes

Memory Layout & Arrays: Elements in memory arrays in Solidity always occupy multiples of 32 bytes (this is even true for byte[], but not for bytes and string). 

  1. Multi-dimensional memory arrays are pointers to memory arrays

  2. The length of a dynamic array is stored at the first slot of the array and followed by the array elements


Slide Screenshot

128.jpg


Slide Text

  • Elements -> 32B Multiples
    • Even byte[]
  • Not bytes & string
  • Multi-dimensional Pointers -> Arrays
  • Dynamic Arrays -> Length + Elements

References


Tags