garbage collection in java interview questions

Learn about garbage collection in java interview questions, we have the largest and most updated garbage collection in java interview questions information on alibabacloud.com

"Java" How to answer Java garbage collection mechanism

(1)GC是垃圾收集的意思(GabageCollection),内存处理是编程人员容易出现问题的地方,忘记或者错误的内存回收会导致程序或系统的不稳定甚至崩溃,Java提供的GC功能可以自动监测对象是否超过作用域从而达到自动回收内存的目的,Java语言没有提供释放已分配内存的显示操作方法。(2)对于GC来说,当程序员创建对象时,GC就开始监控这个对象的地址、大小以及使用情况。通常,GC采用有向图的方式记录和管理堆(heap)中的所有对象。通过这种方式确定哪些对象是"可达的",哪些对象是"不可达的"。当GC确定一些对象为"不可达"时,GC就有责任回收这些内存空间。可以。程序员可以手动执行System.gc(),通知GC运行,但是Java语言规范并不保证GC一定会执行。(3)垃圾回收是一种动态存储管理技术,它自动地释放不再被程

Based on the difference between stack and heap in Java, the paper introduces the garbage collection mechanism in Java _java

#. There are two types of memory in Java. are called stack (stack) and heap (heap), respectively. Stack is the memory space of the program, so all the basic types and references to objects are in the stack. Heap is a Java Virtual machine storage object, it is a huge memory, when you create an object, Java Virtual machine put objects into the heap, the creation

In-depth understanding of Java garbage collection mechanism

In-depth understanding of Java garbage collection mechanismOne: The significance of garbage collection mechanismOne notable feature of the Java language is the introduction of the Java

In-depth understanding of Java garbage collection mechanism

In-depth understanding of Java garbage collection mechanismOne: The significance of garbage collection mechanismOne notable feature of the Java language is the introduction of the Java

Java JVM Garbage collection mechanism

Before the Java language comes out, everyone is desperately writing C or C + + programs, and there is a great contradiction, C + + and other languages to create objects to continue to open up space, do not need to constantly release the control, not only write the constructor, but also write the destructor, A lot of times are repeated in the allocated, and then constantly ~ destruction. So, someone suggested, can write a program in the implementation

"Java noodles question" 49 The advantages and principles of garbage collection. and consider 2 kinds of recycling mechanisms.

1. The most notable feature of the Java language is the introduction of a garbage collection mechanism, which allows Java programmers to write programs without taking into account memory management issues.2, because of this garbage colle

A detailed introduction to the garbage collection mechanism of Java and C #

collectors This collector divides the stack into two or more domains for storing objects of different lifetimes. A new object generated by the JVM is typically placed in one of the domains. Over time, objects that continue to exist will receive a lifetime and go into a longer-lived domain. The generational collector uses different algorithms for different domains to optimize performance. (6) Concurrent collector The concurrent collector runs concurrently with the application. These collectors g

Analysis of Java memory model and garbage collection _java

memory into a number of different regions based on the life cycle of the object's survival. In general, the heap zoning is divided into the old age (tenured Generation) and Cenozoic (young Generation), the old age is characterized by a garbage collection only a small number of objects need to be recycled, and the new generation is characterized by each garbage

"In-depth understanding of Java Virtual machines" garbage collection mechanism

This article is from the "in-depth understanding of Java Virtual Machine," a book, it is very recommended that you look at this book. Other articles in this series:"In- Depth understanding of Java virtual machines" Java memory area model, object creation process, common oom1, garbage

Java garbage Collection Mechanism learning summary

Recently learned a Java garbage collection mechanism, the main content of the general summary:1. What is a garbage collection mechanismJava GC mechanism (garbage collection,

Java garbage collection mechanism

I. Who is doing garbage collection? A popular saying: In C ++In Java, the system is doing garbage collection.JavaYou are doing it yourself. In C ++,The memory is manually released. You must use the delete operator to release the allocated memory. This is a popular saying. Specifically, when an application deems that a

Java garbage collection mechanism and reference type

Java garbage collection mechanism JDK 5 provides four different garbage collection mechanisms: Serial collection, generational collection, parallel

In-depth analysis of Java garbage collection mechanism

need to consider the recycling of the problem, because the end of the method or the end of the thread, the memory naturally with the recycling. While the Java heap and the method area are different, multiple implementation classes in an interface may require different memory, and multiple branches in one method may require different memory, we can only know when the program is running, which objects will be created, this part of the memory allocation

Deep understanding of Java Virtual Machines-garbage collection mechanism (GC)

The garbage collection mechanism (GC) is one of the most important features of Java. It frees developers from the need to focus on the creation and release of memory, but instead automatically reclaims garbage (useless objects) through GC.Which memory needs to be recycledJava heap and method area is the main memory are

Java Foundation-gs (garbage Collection)

Java Garbage Collection OverviewJava GC (Garbage Collection, garbage collection, garbage collector) mechanism, is one of the main difference

Five recommendations for managing Java garbage collection

"Editor's note" The writer is Niv Steingarten, co-founder of Takipi, who is passionate about writing elegant and concise code.By introducing and combing the garbage collector, the author puts forward five suggestions on the management of garbage collection. Reduce collector overhead. Help you to further improve project performance. This article is a domestic ITOM

Java Vamei Quick Tutorial 22 memory management and garbage collection

Vamei Source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!There has been some knowledge of memory management and garbage collection in the entire tutorial. Here's a little summary.Java is run in a virtual memory environment of the JVM. Memory is divided into stacks (stack) and heaps (heap). We will examine these two areas separately.StackThe basic concept of the

A simple understanding of the Java garbage collection mechanism and the role of the Finalize method _java

When the garbage collector wants to reclaim objects, you first call the Finalize method of the class (you can write the program to validate the conclusion), and the normal Java-written class does not need to overwrite this method, because object has implemented a default, unless we want to implement a special function (which It involves a lot of things, such as object space tree and so on.But with classes w

Java Garbage Collection Learning notes

In general, to write Java code, you basically do not need to hear the concept of garbage collection. This is no, for me who has written more than 5 years of Java code, I have not experienced any experience that requires the use of garbage

Advanced Java memory management and garbage collection

. When all the stacks are emptied, the program also ends with the run.HeapAs mentioned above, stacks can take care of themselves. But the heap has to be treated with care. A heap is an area of the JVM that can be freely allocated to objects. When we talk about garbage collection (garbage collection), we mainly recycle

Total Pages: 15 1 .... 8 9 10 11 12 .... 15 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.