What's the cost of our joy? A 22-bit pointer limits the number of loaded classes to approximately four million. There's no automatic rollback to a non-compact mode—if the limit is exceeded, we'll get an OutOfMemoryError. If your app really hits this limit, you must really love long-lived streams. But if you want to revert to the previous mode, you can do it with another flag:
The sentence about what happens when there are more than 4 million classes seems to be unfounded speculation. Not sure what to make of "long-lived streams" either.
View all comments
Show parent comment
1
u/koflerdavid Sep 16 '26 edited Sep 16 '26
I think this paragraph is not entirely legit:
The sentence about what happens when there are more than 4 million classes seems to be unfounded speculation. Not sure what to make of "long-lived streams" either.