Mercurial > hg > truffle
comparison src/share/vm/oops/typeArrayOop.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | f08d439fab8c |
children | d8ce2825b193 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
149 void double_at_put(int which, jdouble contents) { *double_at_addr(which) = contents; } | 149 void double_at_put(int which, jdouble contents) { *double_at_addr(which) = contents; } |
150 | 150 |
151 jbyte byte_at_acquire(int which) const { return OrderAccess::load_acquire(byte_at_addr(which)); } | 151 jbyte byte_at_acquire(int which) const { return OrderAccess::load_acquire(byte_at_addr(which)); } |
152 void release_byte_at_put(int which, jbyte contents) { OrderAccess::release_store(byte_at_addr(which), contents); } | 152 void release_byte_at_put(int which, jbyte contents) { OrderAccess::release_store(byte_at_addr(which), contents); } |
153 | 153 |
154 // Java thinks metadata arrays are just arrays of either long or int, since | |
155 // there doesn't seem to be T_ADDRESS, so this is a bit of unfortunate | |
156 // casting | |
157 #ifdef _LP64 | |
158 Metadata* metadata_at(int which) const { | |
159 return (Metadata*)*long_at_addr(which); } | |
160 void metadata_at_put(int which, Metadata* contents) { | |
161 *long_at_addr(which) = (long)contents; | |
162 } | |
163 #else | |
164 Metadata* metadata_at(int which) const { | |
165 return (Metadata*)*int_at_addr(which); } | |
166 void metadata_at_put(int which, Metadata* contents) { | |
167 *int_at_addr(which) = (int)contents; | |
168 } | |
169 #endif // _LP64 | |
170 | |
154 // Sizing | 171 // Sizing |
155 | 172 |
156 // Returns the number of words necessary to hold an array of "len" | 173 // Returns the number of words necessary to hold an array of "len" |
157 // elements each of the given "byte_size". | 174 // elements each of the given "byte_size". |
158 private: | 175 private: |