8009575: Reduce Symbol::_refcount from 4 bytes to 2 bytes

Added Atomic::inc(short*) to support this change.

Reviewed-by: coleenp, dcubed, dholmes, minqi
This commit is contained in:
Ioi Lam 2013-06-23 22:08:28 -07:00
parent 1c281a9fb3
commit 196c8abc3d
5 changed files with 69 additions and 7 deletions

View file

@ -32,7 +32,9 @@
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
Symbol::Symbol(const u1* name, int length, int refcount) : _refcount(refcount), _length(length) {
Symbol::Symbol(const u1* name, int length, int refcount) {
_refcount = refcount;
_length = length;
_identity_hash = os::random();
for (int i = 0; i < _length; i++) {
byte_at_put(i, name[i]);