1879N/A * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// All classes in the virtual machine must be subclassed 0N/A// by one of the following allocation classes: 0N/A// For objects allocated in the C-heap (managed by: free & malloc). 0N/A// For embedded objects. 0N/A// For classes used as name spaces. 0N/A void operator delete(
void* p);
0N/A// Base class for objects used as value objects. 0N/A// Calling new or delete will result in fatal error. 0N/A void operator delete(
void* p);
0N/A// Base class for classes that constitute name spaces. 0N/A void operator delete(
void* p);
0N/A//------------------------------Chunk------------------------------------------ 0N/A// Linked list of raw memory chunks 0N/A size =
32*
1024 // Default size of an Arena chunk (following the first) 0N/A // Boundaries of data area (possibly unused) 0N/A//------------------------------Arena------------------------------------------ 0N/A// Fast allocation of memory 0N/A char *
_hwm, *
_max;
// High water mark and max in current chunk 0N/A // Fast allocate in the arena. Common case is: pointer test + increment. 0N/A x = (x + (
8-
1)) & ((
unsigned)(-
8));
0N/A x = (x + (
4-
1)) & ((
unsigned)(-
4));
0N/A // Further assume size is padded out to words 0N/A // Warning: in LP64, Amalloc_4 is really Amalloc_8 0N/A assert( (x&(
sizeof(
char*)-
1)) == 0,
"misaligned size" );
0N/A // Fast delete in area. Common case is: NOP (except for storage reclaimed) 0N/A // Reset this Arena to empty, and return this Arenas guts in a new Arena. 0N/A // Determine if pointer belongs to this Arena or not. 0N/A // Total of all chunks in use (not thread-safe) 0N/A // Total # of bytes used 1879N/A#
endif // SHARE_VM_ADLC_ARENA_HPP