Question 41
Which of the following is true regarding Heap Allocation?
Heap allocation supports arbitrary lifetimes, accommodates variable-sized data structures, and experiences fragmentation issues.
Which of the following is true regarding Heap Allocation?
Heap allocation supports arbitrary lifetimes, accommodates variable-sized data structures, and experiences fragmentation issues.
What is 'Dangling Pointer' in C/C++ memory management?
Dangling pointers point to invalid or freed memory locations, causing undefined behavior if dereferenced.
What is a 'Memory Leak'?
Memory leaks occur when heap memory references are lost without releasing the memory back to the operating system.
In a 32-bit architecture, what is the 'Alignment' constraint for storing word-sized integers in memory?
Alignment requires data objects to reside at memory addresses divisible by 2, 4, or 8 bytes for efficient bus access.
What is the primary function of a Code Generator in a compiler?
Code Generation translates intermediate code into target assembly/machine code, selecting optimal instructions and assigning registers.