|
1 | 1 | // -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
|
2 | 2 | //-----------------------------------------------------------------------------
|
3 |
| -// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com) |
| 3 | +// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com) |
4 | 4 | // See the top-level COPYRIGHT file for details.
|
5 | 5 | // SPDX-License-Identifier: Apache-2.0
|
6 | 6 | //-----------------------------------------------------------------------------
|
7 | 7 | /*---------------------------------------------------------------------------*/
|
8 |
| -/* PlatformUtils.cc (C) 2000-2023 */ |
| 8 | +/* PlatformUtils.cc (C) 2000-2024 */ |
9 | 9 | /* */
|
10 | 10 | /* Fonctions utilitaires dépendant de la plateforme. */
|
11 | 11 | /*---------------------------------------------------------------------------*/
|
@@ -525,6 +525,25 @@ getRealTimeNS()
|
525 | 525 | /*---------------------------------------------------------------------------*/
|
526 | 526 | /*---------------------------------------------------------------------------*/
|
527 | 527 |
|
| 528 | +extern "C++" ARCANE_UTILS_EXPORT Int64 platform:: |
| 529 | +getPageSize() |
| 530 | +{ |
| 531 | +#if defined(ARCCORE_OS_WIN32) |
| 532 | + SYSTEM_INFO si; |
| 533 | + GetSystemInfo(&si); |
| 534 | + return si.dwPageSize; |
| 535 | +#elif defined(ARCANE_OS_LINUX) |
| 536 | + return ::sysconf(_SC_PAGESIZE); |
| 537 | +#else |
| 538 | +#warning "getPageSize() not implemented for your platform. Default is 4096" |
| 539 | + Int64 page_size = 4096; |
| 540 | + return page_size; |
| 541 | +#endif |
| 542 | +} |
| 543 | + |
| 544 | +/*---------------------------------------------------------------------------*/ |
| 545 | +/*---------------------------------------------------------------------------*/ |
| 546 | + |
528 | 547 | namespace
|
529 | 548 | {
|
530 | 549 | void (*global_garbage_collector_delegate)() = nullptr;
|
|
0 commit comments