Mercurial > hg > truffle
comparison src/share/vm/runtime/atomic.cpp @ 113:ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author | coleenp |
---|---|
date | Sun, 13 Apr 2008 17:43:42 -0400 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
110:a49a647afe9a | 113:ba764ed4b6f2 |
---|---|
42 new_val = cur; | 42 new_val = cur; |
43 new_val_as_bytes[offset] = exchange_value; | 43 new_val_as_bytes[offset] = exchange_value; |
44 } | 44 } |
45 return cur_as_bytes[offset]; | 45 return cur_as_bytes[offset]; |
46 } | 46 } |
47 | |
48 unsigned Atomic::xchg(unsigned int exchange_value, volatile unsigned int* dest) { | |
49 assert(sizeof(unsigned int) == sizeof(jint), "more work to do"); | |
50 return (unsigned int)Atomic::xchg((jint)exchange_value, (volatile jint*)dest); | |
51 } | |
52 | |
53 unsigned Atomic::cmpxchg(unsigned int exchange_value, | |
54 volatile unsigned int* dest, unsigned int compare_value) { | |
55 assert(sizeof(unsigned int) == sizeof(jint), "more work to do"); | |
56 return (unsigned int)Atomic::cmpxchg((jint)exchange_value, (volatile jint*)dest, | |
57 (jint)compare_value); | |
58 } |