Hi,
Who decides the Heap of an application ?
Heap is dependent upon the RAM's free memory size which is determined by the OS. Correct ? But how ?
I believe that the OS while getting compiled will have a heap definition based on the linker script file / Linker Control File (LCF).
If i am making an application which has some mallocs and callocs in it. And now the Application's Heap is inturn dependant on the OS's heap & the Linker Control File of the application . Correct ?
But, if there is no Linker Control File for the application(a simple application) , then the compiler will inturn interpret the OS Heap memory and allocate heap for this application (during the linking process). Correct ?
Is my above assumption correct ? R there other dependencies ?
CPU architecture decides the direction of Heap Growth. Correct ? Does CPU have any role w.r.t Heap ?
In a small function as below : void func(void) { int i = 1; if(i==5) { printf(" Hello \n "); } } But, Where will the value '5' be present during this 'IF comparison statement' ?
Clarifications needed, Thx in advans, Karthik Balaguru