Chunk

This idea of Chunks is used in Dask, but slightly different context.

CS241E

In CS241E, all data in memory are organized in CS241E, all data in memory are organized in Chunks.

  • chunks = collections of some known number of words stored at consecutive memory locations

In CS241E, we will never push/pop an individual word on the CS241E, we will never push/pop an individual word on the Stack. Instead, we push/pop CS241E, we will never push/pop an individual word on the Stack. Instead, we push/pop Stack. Instead, we push/pop Chunks.

Each chunk stores one frame (the local variables of some procedure), but later in the course, we will also store data other than frames in chunks.

Layout of an example chunk in memory at run time:

  • The 1st word of each chunk always stores the total size of the chunk in bytes.
  • The 2nd word of each chunk is reserved for now (used for Assignment 11)
  • The remaining words contain arbitrary data to be stored in the chunk, such as the values of the local variables when the chunk implements the frame of a procedure. In this example, the chunk holds the values of three variables, , , and , of some procedure