1 /*
2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 // Universe is a name space holding known system classes and objects in the VM.
26 //
27 // Loaded classes are accessible through the SystemDictionary.
28 //
29 // The object heap is allocated and accessed through Universe, and various allocation
30 // support is provided. Allocation by the interpreter and compiled code is done inline
31 // and bails out to Scavenge::invoke_and_allocate.
32
33 class CollectedHeap;
34 class DeferredObjAllocEvent;
35
36
37 // Common parts of a methodOop cache. This cache safely interacts with
38 // the RedefineClasses API.
39 //
40 class CommonMethodOopCache : public CHeapObj {
41 // We save the klassOop and the idnum of methodOop in order to get
42 // the current cached methodOop.
43 private:
44 klassOop _klass;
443 class DeferredObjAllocEvent : public CHeapObj {
444 private:
445 oop _oop;
446 size_t _bytesize;
447 jint _arena_id;
448
449 public:
450 DeferredObjAllocEvent(const oop o, const size_t s, const jint id) {
451 _oop = o;
452 _bytesize = s;
453 _arena_id = id;
454 }
455
456 ~DeferredObjAllocEvent() {
457 }
458
459 jint arena_id() { return _arena_id; }
460 size_t bytesize() { return _bytesize; }
461 oop get_oop() { return _oop; }
462 };
|
1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_MEMORY_UNIVERSE_HPP
26 #define SHARE_VM_MEMORY_UNIVERSE_HPP
27
28 #include "runtime/handles.hpp"
29 #include "utilities/growableArray.hpp"
30
31 // Universe is a name space holding known system classes and objects in the VM.
32 //
33 // Loaded classes are accessible through the SystemDictionary.
34 //
35 // The object heap is allocated and accessed through Universe, and various allocation
36 // support is provided. Allocation by the interpreter and compiled code is done inline
37 // and bails out to Scavenge::invoke_and_allocate.
38
39 class CollectedHeap;
40 class DeferredObjAllocEvent;
41
42
43 // Common parts of a methodOop cache. This cache safely interacts with
44 // the RedefineClasses API.
45 //
46 class CommonMethodOopCache : public CHeapObj {
47 // We save the klassOop and the idnum of methodOop in order to get
48 // the current cached methodOop.
49 private:
50 klassOop _klass;
449 class DeferredObjAllocEvent : public CHeapObj {
450 private:
451 oop _oop;
452 size_t _bytesize;
453 jint _arena_id;
454
455 public:
456 DeferredObjAllocEvent(const oop o, const size_t s, const jint id) {
457 _oop = o;
458 _bytesize = s;
459 _arena_id = id;
460 }
461
462 ~DeferredObjAllocEvent() {
463 }
464
465 jint arena_id() { return _arena_id; }
466 size_t bytesize() { return _bytesize; }
467 oop get_oop() { return _oop; }
468 };
469
470 #endif // SHARE_VM_MEMORY_UNIVERSE_HPP
|