equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 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. |
3779 |
3779 |
3780 bool Metaspace::contains(const void* ptr) { |
3780 bool Metaspace::contains(const void* ptr) { |
3781 if (UseSharedSpaces && MetaspaceShared::is_in_shared_space(ptr)) { |
3781 if (UseSharedSpaces && MetaspaceShared::is_in_shared_space(ptr)) { |
3782 return true; |
3782 return true; |
3783 } |
3783 } |
3784 |
3784 return contains_non_shared(ptr); |
|
3785 } |
|
3786 |
|
3787 bool Metaspace::contains_non_shared(const void* ptr) { |
3785 if (using_class_space() && get_space_list(ClassType)->contains(ptr)) { |
3788 if (using_class_space() && get_space_list(ClassType)->contains(ptr)) { |
3786 return true; |
3789 return true; |
3787 } |
3790 } |
3788 |
3791 |
3789 return get_space_list(NonClassType)->contains(ptr); |
3792 return get_space_list(NonClassType)->contains(ptr); |