c++ - Where is the stack implemented? -


this question has answer here:

c++ allows programer use either stack allocated memory or dynamic memory on heap. clear on how stack operates (i have created stacks exercises in c++) still curious how , "the stack" defined.

is "the stack" feature of language, feature of os or feature of hardware? have vague idea each stack relating each of many active thread processes perspective of operating system. suggest me it's implemented on software level , not hardwired feature of cpu or motherboard.

i imagine, in case of c++, compiler might have inserted implementation of stack each binary. or maybe os applies it's own stack implementation each running process? how , defined?

i found similar question here don't see answered , hope re-state question more directly.

"is "the stack" feature of language, feature of os or feature of hardware?"

it's feature of the hardware actually. cpu's provide feature of stack pointer register, used call instructions. part of memory should reserved os (bare metal) implementation dependent.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -