Drivers may cause memory overflow in Java versions of Minecraft.
After testing various hardware, I discovered this issue. AMD drivers may cause memory overflow in older versions of Minecraft.
(Intel's integrated graphics card and Nvidia's independent graphics card will not encounter this issue)
However, once AMD's independent graphics card or CPU's integrated graphics card is used, it can cause memory overflow in the Java version of Minecraft (specifically manifested as the longer the game time, the infinite increase in Java's memory usage, until the game itself crashes)
If using AMD 22.6.1 driver version, it will not cause memory overflow issues in Minecraft.
Please check for any issues with the new driver and fix it. thank you!