comparison src/share/vm/oops/symbol.cpp @ 11033:d9eed26d638a

8009575: Reduce Symbol::_refcount from 4 bytes to 2 bytes Summary: Added Atomic::inc(short*) to support this change. Reviewed-by: coleenp, dcubed, dholmes, minqi
author iklam
date Sun, 23 Jun 2013 22:08:28 -0700
parents a1ebd310d5c1
children 9758d9f36299
comparison
equal deleted inserted replaced
11032:b7bc7c94b4b5 11033:d9eed26d638a
30 #include "runtime/atomic.inline.hpp" 30 #include "runtime/atomic.inline.hpp"
31 #include "runtime/os.hpp" 31 #include "runtime/os.hpp"
32 #include "memory/allocation.inline.hpp" 32 #include "memory/allocation.inline.hpp"
33 #include "memory/resourceArea.hpp" 33 #include "memory/resourceArea.hpp"
34 34
35 Symbol::Symbol(const u1* name, int length, int refcount) : _refcount(refcount), _length(length) { 35 Symbol::Symbol(const u1* name, int length, int refcount) {
36 _refcount = refcount;
37 _length = length;
36 _identity_hash = os::random(); 38 _identity_hash = os::random();
37 for (int i = 0; i < _length; i++) { 39 for (int i = 0; i < _length; i++) {
38 byte_at_put(i, name[i]); 40 byte_at_put(i, name[i]);
39 } 41 }
40 } 42 }