Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

automatic/static memory allocation

Maybe a naive question, but...

Confirm or deny:

The existence of memory for objects/variables of automatic and static storage duration is determined compile-time and there is absolutely zero chance that the program will fail runtime because there wasn't enough memory for an automatic object.

Naturally, when the constructor of an automatic object performs dynamic allocations and such allocation fails, we consider this to be a failure on dynamic allocation, and not automatic.

like image 953
Armen Tsirunyan Avatar asked Nov 27 '22 06:11

Armen Tsirunyan


1 Answers

Two words : Stack Overflow. :P

like image 97
Prasoon Saurav Avatar answered Dec 05 '22 11:12

Prasoon Saurav