Static members where does they reside. i need an detail explanation of static ,local and instance members memory allocation(variables,methods). Memory management(Is it permanent generation).
Where does the Static members reside in memory,is it permanent generation?
264 Views Asked by Vinay S Jain At
2
There are 2 best solutions below
0
Mateusz Dymczyk
On
It depends on the Java version you are using:
- Pre Java8: statics (just like other "permanent" things) were stored in a
PermGen. It's simply part of the memory model like young gen and old gen. - Java8: here PermGen got removed! For a number of reasons, for instance it was hard to tune it. Of course all the data didn't just got abandoned, since we still need it. It was just moved to
Metaspace, which resides inside native memory (so outside Java heap).
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in MEMORY-MANAGEMENT
- Calling Dealloc method in sprite kit
- Allocating memory for pointers inside structures in functions
- Beginner iOS memory management
- Deleting a dynamically allocated 2D array
- DataTable does not release memory
- how to resize image properly without memory warning
- Application Verifier limits Heap Allocations by default?
- C++ assign const reference to instance variable (memory issues?)
- What memory issues may arise from a single page JavaScript/AJAX application when kept open over a period of months?
- How to increase PHP memory_limit in Debian Jessie?
- Is this correct point to free char*
- Using parse.com and having allocation memory issue
- Qt object ownership when using lambda as slot
- Any ideas why one object is not deallocated in objective-c ARC
- How do I set a buffer in a possibly recursive procedure?
Related Questions in STATIC
- Display images on Django Template Site
- django static folder name change
- Passing values from an array to child template in meteor
- Using NON static class Methods Without reference
- Class variable initialization in python
- C++: What is the proper way to define non-class static const values?
- Another way to program "static": Is Code ok?
- Function level static variable NOT static for lazy book keeping
- Static interface equivalent C#
- Xcode6.3.2 Swift bug with static constants
- Javascript static vs instance, prototype keyword
- Static util class with Spring, unsure if I should make it a SpringBean, design concerns
- assign static final variable in a static try-catch
- C# function reference to an overloaded method
- Access static const variable from derived classes
Related Questions in STATIC-MEMBERS
- Constant expression initializer for static class member of type double
- Xcode6.3.2 Swift bug with static constants
- Access static const variable from derived classes
- Xamarin Android [Application] annotation and static values
- Where are static final variables used in java?
- Definition of the static data member
- Why am I getting 'fatal error: Array index out of range' with this code?
- Initialising static member class ( for a signal handler )
- How should a Variable Template be referred to in C++14 when declared at Class scope?
- What is the Intention of Constructor Parameters of type of an internal enum?: code from Programming principles and Practice using C++
- using same variable in diffrent source files C++
- c++ template deduction of array size for specified template in header file
- C++ Copy Construction of Static Object
- GCC gives an "undefined reference" error to static data members in templated classes that rely on default constructors
- When will the fields in abstract class get initialized
Related Questions in PERMANENT-GENERATION
- Adding Custom permalink tags in wordpress
- Permanent Generation : does the capacity of default value get fixed or will it grow as required?
- PermGen problems with Lift and Jetty
- Permanent generation heap in DVM
- JVM performance tuning: young copy vs old generation gc
- Permanently running executable
- static allocation in java - heap, stack and permanent generation
- OpenPose in Google Collab to be Permanent to my google drive?
- Where does the Static members reside in memory,is it permanent generation?
- How do I discover what is in the permanent generation
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
static members : permanent generation(heap)
local variable : stack memory which is not heap. refer here http://tutorials.jenkov.com/java-concurrency/java-memory-model.html