src/share/vm/interpreter/oopMapCache.cpp

changeset 3900
d2a62e0f25eb
parent 2314
f95d63e2154a
child 4037
da91efe96a93
     1.1 --- a/src/share/vm/interpreter/oopMapCache.cpp	Wed Jun 27 15:23:36 2012 +0200
     1.2 +++ b/src/share/vm/interpreter/oopMapCache.cpp	Thu Jun 28 17:03:16 2012 -0400
     1.3 @@ -348,7 +348,7 @@
     1.4    if (mask_size() > small_mask_limit) {
     1.5      assert(_bit_mask[0] == 0, "bit mask should be new or just flushed");
     1.6      _bit_mask[0] = (intptr_t)
     1.7 -      NEW_C_HEAP_ARRAY(uintptr_t, mask_word_size());
     1.8 +      NEW_C_HEAP_ARRAY(uintptr_t, mask_word_size(), mtClass);
     1.9    }
    1.10  }
    1.11  
    1.12 @@ -356,7 +356,7 @@
    1.13    if (mask_size() > small_mask_limit && _bit_mask[0] != 0) {
    1.14      assert(!Thread::current()->resource_area()->contains((void*)_bit_mask[0]),
    1.15        "This bit mask should not be in the resource area");
    1.16 -    FREE_C_HEAP_ARRAY(uintptr_t, _bit_mask[0]);
    1.17 +    FREE_C_HEAP_ARRAY(uintptr_t, _bit_mask[0], mtClass);
    1.18      debug_only(_bit_mask[0] = 0;)
    1.19    }
    1.20  }
    1.21 @@ -506,7 +506,7 @@
    1.22  OopMapCache::OopMapCache() :
    1.23    _mut(Mutex::leaf, "An OopMapCache lock", true)
    1.24  {
    1.25 -  _array  = NEW_C_HEAP_ARRAY(OopMapCacheEntry, _size);
    1.26 +  _array  = NEW_C_HEAP_ARRAY(OopMapCacheEntry, _size, mtClass);
    1.27    // Cannot call flush for initialization, since flush
    1.28    // will check if memory should be deallocated
    1.29    for(int i = 0; i < _size; i++) _array[i].initialize();
    1.30 @@ -520,7 +520,7 @@
    1.31    flush();
    1.32    // Deallocate array
    1.33    NOT_PRODUCT(_total_memory_usage -= sizeof(OopMapCache) + (sizeof(OopMapCacheEntry) * _size);)
    1.34 -  FREE_C_HEAP_ARRAY(OopMapCacheEntry, _array);
    1.35 +  FREE_C_HEAP_ARRAY(OopMapCacheEntry, _array, mtClass);
    1.36  }
    1.37  
    1.38  OopMapCacheEntry* OopMapCache::entry_at(int i) const {
    1.39 @@ -639,9 +639,9 @@
    1.40  
    1.41  void OopMapCache::compute_one_oop_map(methodHandle method, int bci, InterpreterOopMap* entry) {
    1.42    // Due to the invariants above it's tricky to allocate a temporary OopMapCacheEntry on the stack
    1.43 -  OopMapCacheEntry* tmp = NEW_C_HEAP_ARRAY(OopMapCacheEntry, 1);
    1.44 +  OopMapCacheEntry* tmp = NEW_C_HEAP_ARRAY(OopMapCacheEntry, 1, mtClass);
    1.45    tmp->initialize();
    1.46    tmp->fill(method, bci);
    1.47    entry->resource_copy(tmp);
    1.48 -  FREE_C_HEAP_ARRAY(OopMapCacheEntry, tmp);
    1.49 +  FREE_C_HEAP_ARRAY(OopMapCacheEntry, tmp, mtInternal);
    1.50  }

mercurial