Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
C or C++ *programs* to illustrate the exhaustion of stack allocation and heap allocation
Posted
Updated 27-Jan-15 10:34am
v3
Comments
Andreas Gieriet 27-Jan-15 17:00pm    
So, do write a program that allocates ad-infinitum some memory.
What's the question exactly?
Cheers
Andi

1 solution

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Jan-15 20:39pm    
Not to blame your personally, but I would down-vote the author of the "contest" you referenced by 1, due to the pointless rules: the fuzzy concept of "obvious recursion" is used. Recursion cannot be obvious or not obvious, it can be direct or indirect (mutual), and so on; what is not obvious to some will be obvious to others, and so on. It looks like the author has no interesting ideas but feels that such ideas can emerge from this field. Wrong, because this is the empty-minded idea. All stack overflow stuff is boring and trivial from the very beginning. The best answer is "webbrowser.open("http://stackoverflow.com/")" :-)

There are too many real software wonders to waste time on nothing. At the same time, heap very non-trivial thing, fragmentation and all that stuff. Believe or not, but heap algorithms if the field of ongoing research, and not only engineering. You did not address this part of the question, but I'm not sure this question, as formulate, deserve answering.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900