stack - Are there stackless or heapless implementation of C++? -


c++ standard not mention stack or heap, implementation specific, true.

even though not part of c++ standard, end using them anyway, it's part of language , have taken consideration memory or performance purpose.

hence question are there implementations of c++ doesn't use stacks , heaps?

others have given answers heap, i'll leave alone.

some implementations (e.g., on ibm mainframes) don't use stack people think of it, simple reason hardware doesn't support it. instead, when call function, activation record (i.e., space locals, arguments, , return address) allocated (their version of) heap. these activation records built linked list.

from purely abstract viewpoint, stack -- supports last-in, first-out semantics, other stack. have @ pretty abstractly call stack though. if showed people diagram of memory blocks linked together, think it's safe guess programmers describe linked list. if pushed them, think judge "yeah, can use in stack-like manner, it's still linked list."


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -