hotspot/src/share/vm/memory/allocation.inline.hpp
author zgu
Mon, 06 May 2013 11:15:13 -0400
changeset 17302 915323420691
parent 17087 f0b76c4c93a0
child 17376 4ee999c3c007
permissions -rw-r--r--
8013120: NMT: Kitchensink crashes with assert(next_region == NULL || !next_region->is_committed_region()) failed: Sanity check Summary: Fixed NMT to deal with releasing virtual memory region when there are still committed regions within it Reviewed-by: acorn, coleenp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
15855
2ac9ebea17f3 8008959: Fix non-PCH build on Linux, Windows and MacOS X
simonis
parents: 14083
diff changeset
     2
 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_MEMORY_ALLOCATION_INLINE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_MEMORY_ALLOCATION_INLINE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
15855
2ac9ebea17f3 8008959: Fix non-PCH build on Linux, Windows and MacOS X
simonis
parents: 14083
diff changeset
    28
#include "runtime/atomic.inline.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "runtime/os.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
// Explicit C-heap memory management
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
void trace_heap_malloc(size_t size, const char* name, void *p);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
void trace_heap_free(void *p);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
8325
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    36
#ifndef PRODUCT
8320
544210b4dd48 7017124: Fix some VM stats to avoid 32-bit overflow
kvn
parents: 7397
diff changeset
    37
// Increments unsigned long value for statistics (not atomic on MP).
544210b4dd48 7017124: Fix some VM stats to avoid 32-bit overflow
kvn
parents: 7397
diff changeset
    38
inline void inc_stat_counter(volatile julong* dest, julong add_value) {
8325
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    39
#if defined(SPARC) || defined(X86)
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    40
  // Sparc and X86 have atomic jlong (8 bytes) instructions
8320
544210b4dd48 7017124: Fix some VM stats to avoid 32-bit overflow
kvn
parents: 7397
diff changeset
    41
  julong value = Atomic::load((volatile jlong*)dest);
544210b4dd48 7017124: Fix some VM stats to avoid 32-bit overflow
kvn
parents: 7397
diff changeset
    42
  value += add_value;
544210b4dd48 7017124: Fix some VM stats to avoid 32-bit overflow
kvn
parents: 7397
diff changeset
    43
  Atomic::store((jlong)value, (volatile jlong*)dest);
8325
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    44
#else
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    45
  // possible word-tearing during load/store
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    46
  *dest += add_value;
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    47
#endif
8320
544210b4dd48 7017124: Fix some VM stats to avoid 32-bit overflow
kvn
parents: 7397
diff changeset
    48
}
8325
cc62dbe71e6a 7018849: 7017124 fix broke VM build on some platforms
kvn
parents: 8320
diff changeset
    49
#endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
// allocate using malloc; will fail if no memory available
14083
103054a71a30 8000617: It should be possible to allocate memory without the VM dying.
nloodin
parents: 13963
diff changeset
    52
inline char* AllocateHeap(size_t size, MEMFLAGS flags, address pc = 0,
103054a71a30 8000617: It should be possible to allocate memory without the VM dying.
nloodin
parents: 13963
diff changeset
    53
    AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) {
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    54
  if (pc == 0) {
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    55
    pc = CURRENT_PC;
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    56
  }
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    57
  char* p = (char*) os::malloc(size, flags, pc);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  #ifdef ASSERT
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    59
  if (PrintMallocFree) trace_heap_malloc(size, "AllocateHeap", p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  #endif
17087
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
    61
  if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) {
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
    62
    vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "AllocateHeap");
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
    63
  }
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    64
  return p;
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    65
}
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    66
14083
103054a71a30 8000617: It should be possible to allocate memory without the VM dying.
nloodin
parents: 13963
diff changeset
    67
inline char* ReallocateHeap(char *old, size_t size, MEMFLAGS flags,
103054a71a30 8000617: It should be possible to allocate memory without the VM dying.
nloodin
parents: 13963
diff changeset
    68
    AllocFailType alloc_failmode = AllocFailStrategy::EXIT_OOM) {
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    69
  char* p = (char*) os::realloc(old, size, flags, CURRENT_PC);
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    70
  #ifdef ASSERT
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    71
  if (PrintMallocFree) trace_heap_malloc(size, "ReallocateHeap", p);
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    72
  #endif
17087
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
    73
  if (p == NULL && alloc_failmode == AllocFailStrategy::EXIT_OOM) {
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
    74
    vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "ReallocateHeap");
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
    75
  }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  return p;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    79
inline void FreeHeap(void* p, MEMFLAGS memflags = mtInternal) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  #ifdef ASSERT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  if (PrintMallocFree) trace_heap_free(p);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  #endif
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    83
  os::free(p, memflags);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
}
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    85
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    86
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    87
template <MEMFLAGS F> void* CHeapObj<F>::operator new(size_t size,
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    88
      address caller_pc){
17031
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
    89
#ifdef ASSERT
17026
72b2233861f1 8010992: Remove calls to global ::operator new[] and new
minqi
parents: 16682
diff changeset
    90
    void* p = (void*)AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC));
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    91
    if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
17031
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
    92
    return p;
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
    93
#else
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
    94
    return (void *) AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC));
17026
72b2233861f1 8010992: Remove calls to global ::operator new[] and new
minqi
parents: 16682
diff changeset
    95
#endif
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    96
  }
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    97
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    98
template <MEMFLAGS F> void* CHeapObj<F>::operator new (size_t size,
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
    99
  const std::nothrow_t&  nothrow_constant, address caller_pc) {
17031
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
   100
#ifdef ASSERT
14083
103054a71a30 8000617: It should be possible to allocate memory without the VM dying.
nloodin
parents: 13963
diff changeset
   101
  void* p = (void*)AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC),
103054a71a30 8000617: It should be possible to allocate memory without the VM dying.
nloodin
parents: 13963
diff changeset
   102
      AllocFailStrategy::RETURN_NULL);
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   103
    if (PrintMallocFree) trace_heap_malloc(size, "CHeapObj-new", p);
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   104
    return p;
17031
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
   105
#else
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
   106
  return (void *) AllocateHeap(size, F, (caller_pc != 0 ? caller_pc : CALLER_PC),
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
   107
      AllocFailStrategy::RETURN_NULL);
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
   108
#endif
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   109
}
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   110
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   111
template <MEMFLAGS F> void CHeapObj<F>::operator delete(void* p){
17031
9a576749065b 8012907: anti-delta fix for 8010992
dcubed
parents: 17026
diff changeset
   112
   FreeHeap(p, F);
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   113
}
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   114
16682
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   115
template <class E, MEMFLAGS F>
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   116
E* ArrayAllocator<E, F>::allocate(size_t length) {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   117
  assert(_addr == NULL, "Already in use");
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   118
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   119
  _size = sizeof(E) * length;
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   120
  _use_malloc = _size < ArrayAllocatorMallocLimit;
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   121
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   122
  if (_use_malloc) {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   123
    _addr = AllocateHeap(_size, F);
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   124
    if (_addr == NULL && _size >=  (size_t)os::vm_allocation_granularity()) {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   125
      // malloc failed let's try with mmap instead
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   126
      _use_malloc = false;
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   127
    } else {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   128
      return (E*)_addr;
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   129
    }
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   130
  }
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   131
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   132
  int alignment = os::vm_allocation_granularity();
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   133
  _size = align_size_up(_size, alignment);
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   134
17302
915323420691 8013120: NMT: Kitchensink crashes with assert(next_region == NULL || !next_region->is_committed_region()) failed: Sanity check
zgu
parents: 17087
diff changeset
   135
  _addr = os::reserve_memory(_size, NULL, alignment, F);
16682
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   136
  if (_addr == NULL) {
17087
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
   137
    vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (reserve)");
16682
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   138
  }
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   139
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   140
  bool success = os::commit_memory(_addr, _size, false /* executable */);
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   141
  if (!success) {
17087
f0b76c4c93a0 8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
ccheung
parents: 17031
diff changeset
   142
    vm_exit_out_of_memory(_size, OOM_MMAP_ERROR, "Allocator (commit)");
16682
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   143
  }
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   144
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   145
  return (E*)_addr;
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   146
}
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   147
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   148
template<class E, MEMFLAGS F>
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   149
void ArrayAllocator<E, F>::free() {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   150
  if (_addr != NULL) {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   151
    if (_use_malloc) {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   152
      FreeHeap(_addr, F);
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   153
    } else {
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   154
      os::release_memory(_addr, _size);
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   155
    }
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   156
    _addr = NULL;
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   157
  }
4e30a46f6b76 7197666: java -d64 -version core dumps in a box with lots of memory
brutisso
parents: 15855
diff changeset
   158
}
13195
be27e1b6a4b9 6995781: Native Memory Tracking (Phase 1)
zgu
parents: 8325
diff changeset
   159
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   160
#endif // SHARE_VM_MEMORY_ALLOCATION_INLINE_HPP