Computer Memory

Memory Model / Memory Layout

There are 3 main memory models (as I saw here):

  1. Flat Memory Model
  2. Paged Memory Model
  3. x86 segmented memory model

CUDA 2D Memory layout:

  1. Pitch Linear Memory Layout
  2. Block Linear Memory Layout

When it comes to images, you also should look at Image Encoding.

https://www.geeksforgeeks.org/memory-layout-of-c-program/

The 4 main sections:

  • Text segment (stores code/instructions)
  • Global / static data
    • Data segment (stores initialized global/static variables)
    • BSS segment (uninitialized data)
  • Read-only data?
  • Heap (used for dynamic memory allocation)
  • Stack (stores function calls, local variables, etc.)