X hits on this document

172 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 views172
Page views172
Page last viewedFri Dec 09 22:10:18 UTC 2016
Pages62
Paragraphs993
Words3163

Comments