Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: Memory Allo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 11 Topic 26122 of 26960
Post > Topic >>

Re: Memory Allocation : Static or Dynamic?

by roberson@[EMAIL PROTECTED] (Walter Roberson) May 8, 2008 at 06:37 PM

In article <slrng26f6m.mou.nospam@[EMAIL PROTECTED]
>,
Antoninus Twink  <nospam@[EMAIL PROTECTED]
> wrote:

>What's going on is that in your process's virtual address space, memory
>is arranged like this:

>-----------------------
>|                     |
>|       STACK         |
>|  (grows downwards)  |
>|                     |
>-----------------------
>|                     |
>|     FREE MEMORY     |
>| (available for the  |
>|   stack or heap)    |
>|                     |
>-----------------------
>|                     |
>|        HEAP         |
>|   (grows upwards)   |
>|                     |
>-----------------------

>So if you run out of free memory and overflow the stack, you can see
>that bad things will happen.


You truly are an amazing mind-reader! I don't know how you do it!!
*Knowing* with certainty that the original poster is now and will
always be using a system on which the stack grows downwards
and the heap grows upwards.

It doesn't happen that way in the system I'm using right now (a
general-purpose system that at one time was the market leader in
several different computing niches), and it doesn't happen that way
when you start dealing with threads; and it isn't unusual for it not to
happen that way once you start considering where -exactly- shared
libraries get mapped into memory...

-- 
  "It's a hard life sometimes and the biggest temptation is to let
  how hard it is be an excuse to weaken."        -- Walter Dean Myers
 




 11 Posts in Topic:
Memory Allocation : Static or Dynamic?
swornavidhya.mahadevan@[E  2008-05-08 09:58:37 
Re: Memory Allocation : Static or Dynamic?
Antoninus Twink <nospa  2008-05-08 19:48:06 
Re: Memory Allocation : Static or Dynamic?
roberson@[EMAIL PROTECTED  2008-05-08 18:37:36 
Re: Memory Allocation : Static or Dynamic?
Eric Sosman <Eric.Sosm  2008-05-08 15:05:47 
Re: Memory Allocation : Static or Dynamic?
pete <pfiland@[EMAIL P  2008-05-08 17:35:19 
Re: Memory Allocation : Static or Dynamic?
"Malcolm McLean"  2008-05-10 09:20:37 
Re: Memory Allocation : Static or Dynamic?
roberson@[EMAIL PROTECTED  2008-05-08 17:54:14 
Re: Memory Allocation : Static or Dynamic?
Antoninus Twink <nospa  2008-05-08 21:00:32 
Re: Memory Allocation : Static or Dynamic?
Antoninus Twink <nospa  2008-05-08 21:20:49 
Re: Memory Allocation : Static or Dynamic?
Antoninus Twink <nospa  2008-05-08 23:52:02 
Re: Memory Allocation : Static or Dynamic?
"cr88192" <c  2008-05-09 18:14:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 16:36:23 CDT 2008.