X hits on this document

248 views

0 shares

0 downloads

0 comments

32 / 62

32

Array Memory Allocation

Global lifetime, static shape:

The array’s shape is known at compile time, and exists throughout the entire program.

Array can be allocated in static global memory.

int global_var[30];  void main() { };

Local lifetime, static shape:

The array’s shape is known at compile time, but exists only as locally needed.

Array is allocated in subroutine’s stack frame.

void main() { int local_var[30]; }

Document info
Document views248
Page views248
Page last viewedFri Jan 20 11:00:04 UTC 2017
Pages62
Paragraphs993
Words3163

Comments