Stack/Heap

Started by
4 comments, last by Mat1515 20 years, 5 months ago
How much information can the stack hold? How much information can the heap hold? Thanks
Ut o not me again:) lol
Advertisement
1) defined by your compiler
2) lots. (mostly defined by your os)
Not enough. Usually enough.


The answer varies per execution environment (OS, compiler, library version, ...) and per system (installed RAM, CPU addressing bit width, etc).

On a modern PC running Windows or Linux, you can usually get several hundred kilobytes to over a meg on the stack, and over a gig of memory into the heap before you get fragmentation of virtual address space.

Just arbitrarily using stack is not good design though, and arbitrarily allocating memory also has its problems, because testing out-of-memory conditions is really hard.
enum Bool { True, False, FileNotFound };
I see
I see
Ut o not me again:) lol
I think I heard an echo




--{You fight like a dairy farmer!}

--{You fight like a dairy farmer!}

This topic is closed to new replies.

Advertisement