memory allocation doubt

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2008
Posts: 62
Reputation: AutoC is an unknown quantity at this point 
Solved Threads: 0
AutoC AutoC is offline Offline
Junior Poster in Training

memory allocation doubt

 
0
  #1
Oct 6th, 2009
Hi,

I'm not clear as to when memory is allocated from the stack, free store or data area.Can someone please elaborate?
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 1,433
Reputation: William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of 
Solved Threads: 118
Sponsor
William Hemsworth William Hemsworth is offline Offline
Nearly a Posting Virtuoso
 
0
  #2
Oct 6th, 2009
Heap Memory: [link]
Stack Memory: [link]
I need pageviews! most fun profile ever :)
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 61
Reputation: chunalt787 is an unknown quantity at this point 
Solved Threads: 1
chunalt787 chunalt787 is offline Offline
Junior Poster in Training
 
0
  #3
Oct 6th, 2009
Definitely read the links provided above but the short answer to your question is that pointers point to data stored on the stack and everything else is on the program stack. But remember, the pointer is on the stack and the data it points to is on the heap. For a brief pointer overview see this site

http://coutblog.blogspot.com/2009/10...explained.html

For beginner programmers the only time they really need to worry about this is when they are using pointers.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC