comparison 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
comparison
equal deleted inserted replaced
2176:27e4ea99855d 2177:3582bf76420e
105 char* buffer = mapinfo->region_base(md); 105 char* buffer = mapinfo->region_base(md);
106 106
107 // Skip over (reserve space for) a list of addresses of C++ vtables 107 // Skip over (reserve space for) a list of addresses of C++ vtables
108 // for Klass objects. They get filled in later. 108 // for Klass objects. They get filled in later.
109 109
110 void** vtbl_list = (void**)buffer;
111 buffer += vtbl_list_size * sizeof(void*);
112 Universe::init_self_patching_vtbl_list(vtbl_list, vtbl_list_size);
113
110 // Skip over (reserve space for) dummy C++ vtables Klass objects. 114 // Skip over (reserve space for) dummy C++ vtables Klass objects.
111 // They are used as is. 115 // They are used as is.
112 116
113 void** vtbl_list = (void**)buffer;
114 buffer += vtbl_list_size * sizeof(void*);
115 intptr_t vtable_size = *(intptr_t*)buffer; 117 intptr_t vtable_size = *(intptr_t*)buffer;
116 buffer += sizeof(intptr_t); 118 buffer += sizeof(intptr_t);
117 buffer += vtable_size; 119 buffer += vtable_size;
120
121 // Skip the recorded symbols.
122
123 intptr_t total_symbol_size = *(intptr_t*)buffer;
124 buffer += sizeof(intptr_t) * 2;
125 buffer += total_symbol_size;
118 126
119 // Create the symbol table using the bucket array at this spot in the 127 // Create the symbol table using the bucket array at this spot in the
120 // misc data space. Since the symbol table is often modified, this 128 // misc data space. Since the symbol table is often modified, this
121 // region (of mapped pages) will be copy-on-write. 129 // region (of mapped pages) will be copy-on-write.
122 130