src/share/vm/services/heapDumper.cpp

changeset 3900
d2a62e0f25eb
parent 3272
2ceafe3ceb65
child 3969
1d7922586cf6
     1.1 --- a/src/share/vm/services/heapDumper.cpp	Wed Jun 27 15:23:36 2012 +0200
     1.2 +++ b/src/share/vm/services/heapDumper.cpp	Thu Jun 28 17:03:16 2012 -0400
     1.3 @@ -436,7 +436,7 @@
     1.4    // sufficient memory then reduce size until we can allocate something.
     1.5    _size = io_buffer_size;
     1.6    do {
     1.7 -    _buffer = (char*)os::malloc(_size);
     1.8 +    _buffer = (char*)os::malloc(_size, mtInternal);
     1.9      if (_buffer == NULL) {
    1.10        _size = _size >> 1;
    1.11      }
    1.12 @@ -1405,7 +1405,7 @@
    1.13      _gc_before_heap_dump = gc_before_heap_dump;
    1.14      _is_segmented_dump = false;
    1.15      _dump_start = (jlong)-1;
    1.16 -    _klass_map = new (ResourceObj::C_HEAP) GrowableArray<Klass*>(INITIAL_CLASS_COUNT, true);
    1.17 +    _klass_map = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<Klass*>(INITIAL_CLASS_COUNT, true);
    1.18      _stack_traces = NULL;
    1.19      _num_threads = 0;
    1.20      if (oome) {
    1.21 @@ -1426,7 +1426,7 @@
    1.22        for (int i=0; i < _num_threads; i++) {
    1.23          delete _stack_traces[i];
    1.24        }
    1.25 -      FREE_C_HEAP_ARRAY(ThreadStackTrace*, _stack_traces);
    1.26 +      FREE_C_HEAP_ARRAY(ThreadStackTrace*, _stack_traces, mtInternal);
    1.27      }
    1.28      delete _klass_map;
    1.29    }
    1.30 @@ -1806,7 +1806,7 @@
    1.31    writer()->write_u4(0);                    // thread number
    1.32    writer()->write_u4(0);                    // frame count
    1.33  
    1.34 -  _stack_traces = NEW_C_HEAP_ARRAY(ThreadStackTrace*, Threads::number_of_threads());
    1.35 +  _stack_traces = NEW_C_HEAP_ARRAY(ThreadStackTrace*, Threads::number_of_threads(), mtInternal);
    1.36    int frame_serial_num = 0;
    1.37    for (JavaThread* thread = Threads::first(); thread != NULL ; thread = thread->next()) {
    1.38      oop threadObj = thread->threadObj();
    1.39 @@ -2005,7 +2005,7 @@
    1.40                     dump_file_name, os::current_process_id(), dump_file_ext);
    1.41      }
    1.42      const size_t len = strlen(base_path) + 1;
    1.43 -    my_path = (char*)os::malloc(len);
    1.44 +    my_path = (char*)os::malloc(len, mtInternal);
    1.45      if (my_path == NULL) {
    1.46        warning("Cannot create heap dump file.  Out of system memory.");
    1.47        return;
    1.48 @@ -2014,7 +2014,7 @@
    1.49    } else {
    1.50      // Append a sequence number id for dumps following the first
    1.51      const size_t len = strlen(base_path) + max_digit_chars + 2; // for '.' and \0
    1.52 -    my_path = (char*)os::malloc(len);
    1.53 +    my_path = (char*)os::malloc(len, mtInternal);
    1.54      if (my_path == NULL) {
    1.55        warning("Cannot create heap dump file.  Out of system memory.");
    1.56        return;

mercurial