Bookmark Topic Watch Topic
  • New Topic

memory allocation for methods in java.  RSS feed

 
Mani Tiwary
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
Are methods allocated memory in java ? if so where and when? My teacher said it is given memory when objects are created but then if methods live on the heap how can local variables which are defined in method live on the stack? please clarify in as much details as possible.

Any good book detailing memory allocations for different class members? please recommend.
 
Angel Taveras
Ranch Hand
Posts: 84
Eclipse IDE Hibernate Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
hello you can check some info http://bittermanandy.wordpress.com/2008/10/19/garbage-part-one-stack-and-heap/.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't crosspost -- it wastes people's time and effort. Please continue this discussion in your other topic.

http://www.coderanch.com/t/428378/Java-General-intermediate/java/memory-allocation-methods-java

Henry
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!