JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Memory layout in the JVM: stack, heap, PermGen/Metaspace

    JAVA 25 SELF
    64 level,0 lecture
    Where local variables, objects, and class metadata go during JVM execution: we break down thread stacks, the heap, and the evolution from PermGen → Metaspace. We’ll talk about how GC works, what memory errors occur ( StackOverflowError, OutOfMemoryError), and how startup flags affect things ( -Xss, -Xmx, -XX:MaxMetaspaceSize). Diagrams, a Mermaid chart, and a working example are included.
    Open
  • Garbage collectors: G1, ZGC, Shenandoah, comparison

    JAVA 25 SELF
    64 level,1 lecture
    In this lecture, we explore how the garbage collector ( GC) in the JVM works, how classic Serial/ Parallel/ CMS differ from modern G1, ZGC, and Shenandoah, what young and old generations are, why Stop-the-World pauses happen, and how to minimise them. In practice, we’ll see how to enable different GCs with flags ( -XX:+UseG1GC, -XX:+UseZGC, -XX:+UseShenandoahGC), tune pauses ( -XX:MaxGCPauseMillis) and heap sizes ( -Xms/ -Xmx), read logs ( -Xlog:gc*), and avoid common mistakes (for example, forcing a call to System.gc()).
    Open
  • Local variables, memory leaks, weak references

    JAVA 25 SELF
    64 level,2 lecture
    From this lecture you’ll learn where local variables live (the thread stack) and how it differs from the heap, why memory leaks are still possible in Java despite the GC, and how to avoid them. We’ll break down real scenarios: “eternal” static-collections, unremoved listeners, and caches. We’ll get to know the reference family: SoftReference, WeakReference, PhantomReference, as well as the WeakHashMap container. We’ll practice fixing leaks and discuss why calling System.gc() is merely a hint to the JVM, not a command, and how it can end with an OutOfMemoryError.
    Open
  • Memory analysis tools: jmap, jvisualvm

    JAVA 25 SELF
    64 level,3 lecture
    A practical guide to diagnosing memory issues in the JVM: take a heap dump with jmap, read summaries via -heap and -histo, explore the application in jvisualvm (tabs Monitor, Heap Dump, Threads, Profiler), dissect a leak example, and get acquainted with Eclipse MAT and jconsole. In the end — common mistakes and tips.
    Open
  • Dissecting common memory management mistakes

    JAVA 25 SELF
    64 level,4 lecture
    A practical breakdown of why a Java application can leak memory and slow down: forgotten listeners ( addActionListener/ removeActionListener), everlasting static collections, unclosed resources (tip: try-with-resources), anonymous/inner classes retaining references, and abuse of System.gc(). We will learn to read GC logs ( -Xlog:gc*, -XX:+PrintGCDetails), choose a collector, build caches on WeakHashMap, monitor ( jvisualvm, jconsole), analyze a heap dump, and properly tune -Xmx/ -Xms. We’ll finish with real-world leak examples and their fixes.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy