-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8365823: Revert storing abstract and interface Klasses to non-class metaspace #27295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ec610f4
864e938
48d0c6f
2471bf5
097c6b3
fe44431
c333b8a
f1d08d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,15 +73,15 @@ void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data, | |
| MetaspaceObj::Type type, TRAPS) throw() { | ||
| // Klass has its own operator new | ||
| assert(type != ClassType, "class has its own operator new"); | ||
| return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false, THREAD); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: now that
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, all Klass allocation should call Klass::operator new(). Klass is derived from Metadata that's derived from MetaspaceObj. The Klass operator new hides the one in MetaspaceObj. |
||
| return Metaspace::allocate(loader_data, word_size, type, THREAD); | ||
| } | ||
|
|
||
| void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data, | ||
| size_t word_size, | ||
| MetaspaceObj::Type type) throw() { | ||
| assert(!Thread::current()->is_Java_thread(), "only allowed by non-Java thread"); | ||
| assert(type != ClassType, "class has its own operator new"); | ||
| return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false); | ||
| return Metaspace::allocate(loader_data, word_size, type); | ||
| } | ||
|
|
||
| // This is used for allocating training data. We are allocating training data in many cases where a GC cannot be triggered. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.