src/share/vm/utilities/elfStringTable.cpp

changeset 3901
24b9c7f4cae6
parent 3900
d2a62e0f25eb
child 4153
b9a9ed0f8eeb
equal deleted inserted replaced
3898:bcffa4c5eef6 3901:24b9c7f4cae6
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)) {

mercurial