In which region intern strings are stored?

Опубликовано: 27 Октябрь 2024
на канале: yCrash
292
5

intern() is an interesting function in java.lang.String object. intern() function eliminates duplicate string objects from the application and has potential to reduce overall memory consumption of your application.. JVM Memory has following regions: Heap region (i.e. Young & Old generation), Metaspace and others regions. In this video let's learn through practical examples, in which region, the intern string pool is stored.

If you liked this video, you'll love our Java Performance Masterclass. Learn more:
https://ycrash.io/java-performance-tr...

- - - - - - - - - - - - - -

Topics covered:

00:08 - Java string intern(): Interesting Q&A
00:33 - JVM Memory regions
01:11 - Intern strings stored in Heap region
02:05 - Realtime experiment
04:44 - Heap Usage graph
05:46 - Meta space graph

- - - - - - - - - - - - - -

Links shared in the video:

Java String intern(): Interesting Q & A:
https://blog.ycrash.io/2022/08/03/jav...

JVM memory regions:
   • JVM Memory - Learn Easily  

How to enable GC Logs:
https://blog.gceasy.io/2017/10/17/wha...

Overhead added by Garbage Collection Logging:
https://blog.gceasy.io/2021/08/17/ove...

Benefits of garbage collection log:
https://blog.gceasy.io/2021/07/08/i-d...

Heap region memory graph from above application generated by GCeasy:
https://gceasy.io/my-gc-report.jsp?p=...

Metaspace region memory graph from a different application generated by GCeasy:
https://gceasy.io/my-gc-report.jsp?p=...

- - - - - - - - - - - - - -

Read more in this blog:

https://blog.ycrash.io/2022/08/03/in-...

- - - - - - - - - - - - - -

Our Tools:

yCrash: https://yCrash.io/
GCeasy: https://gceasy.io/
HeapHero: https://heaphero.io/
fastThread Tool: https://fastthread.io/

- - - - - - - - - - - - - -

SRE Community:

Need help in troubleshooting your performance problems?
Post here: https://answers.ycrash.io/

- - - - - - - - - - - - - -

Follow us on:

LinkedIn:   / ycrash  
Instagram:   / ycrash_rca  
Facebook:   / tier1app  
Twitter:   / tier1app  

- - - - - - - - - - - - - -

Related videos:
JVM memory regions:
   • JVM Memory - Learn Easily  

- - - - - - - - - - - - - -

#Javastrings | #manuallyinternstring | #stringinternmethodinjava | #internmethodofstringinjava | #string | #stringsinjava | #strings | #whatisinternmethodinstringclassinjava | #intern | #introductiontostrings | #javastringstutorialforbeginners | #stringpool | #javastringstutorial | #javastringprograminterviewquestionsandanswers