Mercurial > hg > graal-compiler
comparison src/os/windows/vm/perfMemory_windows.cpp @ 9064:4b7cf00ccb08
8006001: [parfait] Possible file leak in hotspot/src/os/linux/vm/perfMemory_linux.cpp
Reviewed-by: zgu, coleenp, hseigel, dholmes
author | ccheung |
---|---|
date | Fri, 05 Apr 2013 11:15:13 -0700 |
parents | 716c64bda5ba |
children | a837fa3d3f86 |
comparison
equal
deleted
inserted
replaced
9060:cc32ccaaf47f | 9064:4b7cf00ccb08 |
---|---|
1579 char** addrp, size_t* sizep, TRAPS) { | 1579 char** addrp, size_t* sizep, TRAPS) { |
1580 | 1580 |
1581 ResourceMark rm; | 1581 ResourceMark rm; |
1582 | 1582 |
1583 void *mapAddress = 0; | 1583 void *mapAddress = 0; |
1584 size_t size; | 1584 size_t size = 0; |
1585 HANDLE fmh; | 1585 HANDLE fmh; |
1586 DWORD ofm_access; | 1586 DWORD ofm_access; |
1587 DWORD mv_access; | 1587 DWORD mv_access; |
1588 const char* luser = NULL; | 1588 const char* luser = NULL; |
1589 | 1589 |
1650 FREE_C_HEAP_ARRAY(char, filename, mtInternal); | 1650 FREE_C_HEAP_ARRAY(char, filename, mtInternal); |
1651 FREE_C_HEAP_ARRAY(char, objectname, mtInternal); | 1651 FREE_C_HEAP_ARRAY(char, objectname, mtInternal); |
1652 | 1652 |
1653 if (*sizep == 0) { | 1653 if (*sizep == 0) { |
1654 size = sharedmem_filesize(rfilename, CHECK); | 1654 size = sharedmem_filesize(rfilename, CHECK); |
1655 assert(size != 0, "unexpected size"); | 1655 } else { |
1656 } | 1656 size = *sizep; |
1657 } | |
1658 | |
1659 assert(size > 0, "unexpected size <= 0"); | |
1657 | 1660 |
1658 // Open the file mapping object with the given name | 1661 // Open the file mapping object with the given name |
1659 fmh = open_sharedmem_object(robjectname, ofm_access, CHECK); | 1662 fmh = open_sharedmem_object(robjectname, ofm_access, CHECK); |
1660 | 1663 |
1661 assert(fmh != INVALID_HANDLE_VALUE, "unexpected handle value"); | 1664 assert(fmh != INVALID_HANDLE_VALUE, "unexpected handle value"); |