Mercurial > hg > truffle
comparison src/share/vm/utilities/array.hpp @ 20279:870c03421152
8049426: Minor cleanups after G1 class unloading
Reviewed-by: stefank, brutisso
author | ehelin |
---|---|
date | Wed, 09 Jul 2014 16:44:30 +0200 |
parents | 2c6ef90f030a |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20278:2c6ef90f030a | 20279:870c03421152 |
---|---|
326 } | 326 } |
327 | 327 |
328 static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); } | 328 static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); } |
329 | 329 |
330 // WhiteBox API helper. | 330 // WhiteBox API helper. |
331 // Can't distinguish between array of length 0 and length 1, | |
332 // will always return 0 in those cases. | |
331 static int bytes_to_length(size_t bytes) { | 333 static int bytes_to_length(size_t bytes) { |
332 assert(is_size_aligned(bytes, BytesPerWord), "Must be, for now"); | 334 assert(is_size_aligned(bytes, BytesPerWord), "Must be, for now"); |
333 | 335 |
334 if (sizeof(Array<T>) >= bytes) { | 336 if (sizeof(Array<T>) >= bytes) { |
335 return 0; | 337 return 0; |