Metaspace stores and manages class metadata in native memory.
Metaspace allocates space in native memory, outside the Java heap, to store metadata for loaded classes. This design allows it to grow as needed, unlike the older PermGen space. When your e-commerce application increases its class loading rate due to a large traffic spike on Black Friday, Metaspace efficiently manages this load without running out of space.
Additional Notes
How does Metaspace handle class metadata in the JVM?