mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 13:04:33 +02:00
6424123: JVM crashes on failed 'strdup' call
Calling os::malloc()/os::strdup() and new os::strdup_check_oom() instead of ::malloc()/::strdup() for native memory tracking purpose Reviewed-by: coleenp, ctornqvi, kvn
This commit is contained in:
parent
69e7c05210
commit
8a690a1250
20 changed files with 82 additions and 36 deletions
|
@ -664,6 +664,8 @@ class os: AllStatic {
|
|||
static void free (void *memblock, MEMFLAGS flags = mtNone);
|
||||
static bool check_heap(bool force = false); // verify C heap integrity
|
||||
static char* strdup(const char *, MEMFLAGS flags = mtInternal); // Like strdup
|
||||
// Like strdup, but exit VM when strdup() returns NULL
|
||||
static char* strdup_check_oom(const char*, MEMFLAGS flags = mtInternal);
|
||||
|
||||
#ifndef PRODUCT
|
||||
static julong num_mallocs; // # of calls to malloc/realloc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue