Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/elfStringTable.cpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | d7e3846464d0 |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
40 m_file = file; | 40 m_file = file; |
41 m_status = NullDecoder::no_error; | 41 m_status = NullDecoder::no_error; |
42 | 42 |
43 // try to load the string table | 43 // try to load the string table |
44 long cur_offset = ftell(file); | 44 long cur_offset = ftell(file); |
45 m_table = (char*)os::malloc(sizeof(char) * shdr.sh_size); | 45 m_table = (char*)os::malloc(sizeof(char) * shdr.sh_size, mtInternal); |
46 if (m_table != NULL) { | 46 if (m_table != NULL) { |
47 // if there is an error, mark the error | 47 // if there is an error, mark the error |
48 if (fseek(file, shdr.sh_offset, SEEK_SET) || | 48 if (fseek(file, shdr.sh_offset, SEEK_SET) || |
49 fread((void*)m_table, shdr.sh_size, 1, file) != 1 || | 49 fread((void*)m_table, shdr.sh_size, 1, file) != 1 || |
50 fseek(file, cur_offset, SEEK_SET)) { | 50 fseek(file, cur_offset, SEEK_SET)) { |