common.cpp 645 B

123456789101112131415161718192021222324
  1. //===-- common.cpp ----------------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #include "common.h"
  9. #include "atomic_helpers.h"
  10. #include "string_utils.h"
  11. namespace scudo {
  12. uptr PageSizeCached;
  13. uptr getPageSize();
  14. uptr getPageSizeSlow() {
  15. PageSizeCached = getPageSize();
  16. CHECK_NE(PageSizeCached, 0);
  17. return PageSizeCached;
  18. }
  19. } // namespace scudo