File tree Expand file tree Collapse file tree 3 files changed +16
-29
lines changed Expand file tree Collapse file tree 3 files changed +16
-29
lines changed Original file line number Diff line number Diff line change 3232#include " code/vtableStubs.hpp"
3333#include " interpreter/interpreter.hpp"
3434#include " memory/allocation.inline.hpp"
35+ #include " os_linux.hpp"
36+ #include " os_posix.hpp"
3537#include " prims/jniFastGetField.hpp"
3638#include " prims/jvm_misc.hpp"
3739#include " runtime/arguments.hpp"
@@ -313,21 +315,6 @@ int os::Linux::get_fpu_control_word(void) {
313315void os::Linux::set_fpu_control_word (int fpu_control) {
314316}
315317
316- bool os::is_allocatable (size_t bytes) {
317-
318- if (bytes < 2 * G) {
319- return true ;
320- }
321-
322- char * addr = reserve_memory (bytes);
323-
324- if (addr != NULL ) {
325- release_memory (addr, bytes);
326- }
327-
328- return addr != NULL ;
329- }
330-
331318// //////////////////////////////////////////////////////////////////////////////
332319// thread stack
333320
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1999, 2013 , Oracle and/or its affiliates. All rights reserved.
3- * Copyright (c) 2015, 2022, Loongson Technology. All rights reserved.
2+ * Copyright (c) 2022 , Oracle and/or its affiliates. All rights reserved.
3+ * Copyright (c) 2022, Loongson Technology. All rights reserved.
44 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55 *
66 * This code is free software; you can redistribute it and/or modify it
2323 *
2424 */
2525
26- #ifndef OS_CPU_LINUX_LOONGARCH_OS_LINUX_LOONGARCH_HPP
27- #define OS_CPU_LINUX_LOONGARCH_OS_LINUX_LOONGARCH_HPP
26+ #ifndef OS_CPU_LINUX_LOONGARCH_OS_LINUX_LOONGARCH_INLINE_HPP
27+ #define OS_CPU_LINUX_LOONGARCH_OS_LINUX_LOONGARCH_INLINE_HPP
2828
29- static void setup_fpu ();
30- static bool is_allocatable (size_t bytes);
31-
32- // Used to register dynamic code cache area with the OS
33- // Note: Currently only used in 64 bit Windows implementations
34- static bool register_code_area (char *low, char *high) { return true ; }
35-
36- static bool is_ActiveCoresMP ();
37-
38- #endif // OS_CPU_LINUX_LOONGARCH_OS_LINUX_LOONGARCH_HPP
29+ #endif // OS_CPU_LINUX_LOONGARCH_OS_LINUX_LOONGARCH_INLINE_HPP
Original file line number Diff line number Diff line change 2222 *
2323 */
2424
25+ /*
26+ * This file has been modified by Loongson Technology in 2022, These
27+ * modifications are Copyright (c) 2022, Loongson Technology, and are made
28+ * available on the same license terms set forth above.
29+ */
30+
2531#ifndef SHARE_RUNTIME_OS_HPP
2632#define SHARE_RUNTIME_OS_HPP
2733
@@ -311,6 +317,9 @@ class os: AllStatic {
311317 return (_processor_count != 1 );
312318 }
313319
320+ // Used only on LoongArch64.
321+ static bool is_ActiveCoresMP ();
322+
314323 static julong available_memory ();
315324 static julong physical_memory ();
316325 static bool has_allocatable_memory_limit (size_t * limit);
You can’t perform that action at this time.
0 commit comments