equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
45 void _ValueObj::operator delete(void* p) { ShouldNotCallThis(); } |
45 void _ValueObj::operator delete(void* p) { ShouldNotCallThis(); } |
46 void* _ValueObj::operator new [](size_t size) throw() { ShouldNotCallThis(); return 0; } |
46 void* _ValueObj::operator new [](size_t size) throw() { ShouldNotCallThis(); return 0; } |
47 void _ValueObj::operator delete [](void* p) { ShouldNotCallThis(); } |
47 void _ValueObj::operator delete [](void* p) { ShouldNotCallThis(); } |
48 |
48 |
49 void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data, |
49 void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data, |
50 size_t word_size, bool read_only, |
50 size_t word_size, |
51 MetaspaceObj::Type type, TRAPS) throw() { |
51 MetaspaceObj::Type type, TRAPS) throw() { |
52 // Klass has it's own operator new |
52 // Klass has it's own operator new |
53 return Metaspace::allocate(loader_data, word_size, read_only, type, THREAD); |
53 return Metaspace::allocate(loader_data, word_size, type, THREAD); |
54 } |
54 } |
55 |
55 |
56 bool MetaspaceObj::is_shared() const { |
56 bool MetaspaceObj::is_shared() const { |
57 return MetaspaceShared::is_in_shared_space(this); |
57 return MetaspaceShared::is_in_shared_space(this); |
58 } |
58 } |