Garbage Collection - part 4 of Java Memory Management

แชร์
ฝัง

ความคิดเห็น • 8

  • @ruixue6955
    @ruixue6955 6 ปีที่แล้ว +6

    29:00 set maximum heap size
    29:35 argument to the JVM: 29:43 -Xmx (maximum heap size)
    30:00 examplevalue: -Xmx10m
    30:28 OutOfMemoryError in runtime
    30:58 a tool that comes with JDK - J visual M
    33:06 monitor tab

  • @mils3318
    @mils3318 5 ปีที่แล้ว +3

    Excellent explenation ! maan... you are a boss :)

  • @seeebeeek1
    @seeebeeek1 6 ปีที่แล้ว +2

    great explenation ! :)

  • @rameshnair1754
    @rameshnair1754 7 ปีที่แล้ว +2

    a very nice tutorial :)

  • @venkatpadiri959
    @venkatpadiri959 6 ปีที่แล้ว +2

    Where do we find the example programs you are using in your video series. Please let us know.

    • @VPPChesterwood
      @VPPChesterwood  6 ปีที่แล้ว

      For more information please look at our website www.virtualpairprogrammers.com/ Many thanks

  • @jhguygih
    @jhguygih 6 ปีที่แล้ว

    Who and when the string pooling are cleaned? Works the same in both permgen and metaspace?

    • @VPPChesterwood
      @VPPChesterwood  6 ปีที่แล้ว +3

      According to here the String Intern Pool now is part of the heap from java 7 but note that it this varies from one JVM implementation to another. There's no permgen in Java 8.www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html#jdk7changes. According to the stackoverflow answer here (stackoverflow.com/questions/4918399/where-does-javas-string-constant-pool-live-the-heap-or-the-stack) :
      quoting "...All strings in the JVM string pool are eligible for garbage collection if there are no references to them from your program roots. It applies to all discussed versions of Java. It means that if your interned string went out of scope and there are no other references to it - it will be garbage collected from the JVM string pool. Being eligible for garbage collection and residing in the heap, a JVM string pool seems to be a right place for all your strings, isn’t it? In theory it is true - non-used strings will be garbage collected from the pool, used strings will allow you to save memory in case then you get an equal string from the input. Seems to be a perfect memory saving strategy? Nearly so. You must know how the string pool is implemented before making any decisions."