简体   繁体   中英

Does .NET have something like Java's permgen?

So I've got a pretty standard spring, hibernate, tomcat environment.. yet I'm getting permgens locally and on CI.

I know there is a TEMPORARY fix (ie increasing the memory assigned to permgen) but this still is only temporary. I'd rather not imagine what a production environment looks like given what I'm seeing.

(a bit of a comparison question) In .NET I have not seen anything similar. Does .NET have its version of permgen?

(in case you do not know what permgen is Significance of PermGen Space )

There is no such thing in the CLR. Just a ordinary heap. The garbage collector (GC) is generational, with three generations. One for young objects, one for long living and one for very long living objects. There is also a lage object heap (LOH). The GC treats the LOH a bit differently in order to increase efficiency. See Large Object Heap Uncovered

No, the CLR (C# is "just" a CLR language) does not have a permanent generation, see Fundamentals of Garbage Collection .

Btw, future versions of the JVM - currently expected at the latest for Java 8 - won't have permgen either (see Oracle discusses Java 7 & 8 new features on video ) (basically as a result of "merging" the "classic" Sun HotSpot VM that has permgen and JRockit JVM).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM