Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/restore.cpp @ 2177:3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
Summary: move symbols from permgen into C heap and reference count them
Reviewed-by: never, acorn, jmasa, stefank
author | coleenp |
---|---|
date | Thu, 27 Jan 2011 16:11:27 -0800 |
parents | f95d63e2154a |
children | 1d1603768966 |
line wrap: on
line diff
--- a/src/share/vm/memory/restore.cpp Thu Jan 27 13:42:28 2011 -0800 +++ b/src/share/vm/memory/restore.cpp Thu Jan 27 16:11:27 2011 -0800 @@ -107,15 +107,23 @@ // Skip over (reserve space for) a list of addresses of C++ vtables // for Klass objects. They get filled in later. + void** vtbl_list = (void**)buffer; + buffer += vtbl_list_size * sizeof(void*); + Universe::init_self_patching_vtbl_list(vtbl_list, vtbl_list_size); + // Skip over (reserve space for) dummy C++ vtables Klass objects. // They are used as is. - void** vtbl_list = (void**)buffer; - buffer += vtbl_list_size * sizeof(void*); intptr_t vtable_size = *(intptr_t*)buffer; buffer += sizeof(intptr_t); buffer += vtable_size; + // Skip the recorded symbols. + + intptr_t total_symbol_size = *(intptr_t*)buffer; + buffer += sizeof(intptr_t) * 2; + buffer += total_symbol_size; + // Create the symbol table using the bucket array at this spot in the // misc data space. Since the symbol table is often modified, this // region (of mapped pages) will be copy-on-write.