@@ -429,7 +429,7 @@ void HeapShared::copy_open_objects(GrowableArray<MemRegion>* open_regions) {
429
429
// Copy _pending_archive_roots into an objArray
430
430
void HeapShared::copy_roots () {
431
431
int length = _pending_roots != NULL ? _pending_roots->length () : 0 ;
432
- int size = objArrayOopDesc::object_size (length);
432
+ size_t size = objArrayOopDesc::object_size (length);
433
433
Klass* k = Universe::objectArrayKlassObj (); // already relocated to point to archived klass
434
434
HeapWord* mem = G1CollectedHeap::heap ()->archive_mem_allocate (size);
435
435
@@ -448,7 +448,7 @@ void HeapShared::copy_roots() {
448
448
for (int i = 0 ; i < length; i++) {
449
449
roots ()->obj_at_put (i, _pending_roots->at (i));
450
450
}
451
- log_info (cds)(" archived obj roots[%d] = %d words, klass = %p, obj = %p" , length, size, k, mem);
451
+ log_info (cds)(" archived obj roots[%d] = " SIZE_FORMAT " words, klass = %p, obj = %p" , length, size, k, mem);
452
452
}
453
453
454
454
void HeapShared::init_narrow_oop_decoding (address base, int shift) {
@@ -912,7 +912,7 @@ class WalkOopAndArchiveClosure: public BasicOopIterateClosure {
912
912
913
913
if (!_record_klasses_only && log_is_enabled (Debug, cds, heap)) {
914
914
ResourceMark rm;
915
- log_debug (cds, heap)(" (%d) %s[" SIZE_FORMAT " ] ==> " PTR_FORMAT " size %d %s" , _level,
915
+ log_debug (cds, heap)(" (%d) %s[" SIZE_FORMAT " ] ==> " PTR_FORMAT " size " SIZE_FORMAT " %s" , _level,
916
916
_orig_referencing_obj->klass ()->external_name (), field_delta,
917
917
p2i (obj), obj->size () * HeapWordSize, obj->klass ()->external_name ());
918
918
LogTarget (Trace, cds, heap) log ;
@@ -1023,7 +1023,7 @@ oop HeapShared::archive_reachable_objects_from(int level,
1023
1023
ResourceMark rm;
1024
1024
log_error (cds, heap)(
1025
1025
" Cannot archive the sub-graph referenced from %s object ("
1026
- PTR_FORMAT " ) size %d , skipped." ,
1026
+ PTR_FORMAT " ) size " SIZE_FORMAT " , skipped." ,
1027
1027
orig_obj->klass ()->external_name (), p2i (orig_obj), orig_obj->size () * HeapWordSize);
1028
1028
if (level == 1 ) {
1029
1029
// Don't archive a subgraph root that's too big. For archives static fields, that's OK
0 commit comments