CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
58 lines
1.6 KiB
C++
58 lines
1.6 KiB
C++
//===-- wrappers_c.h --------------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SCUDO_WRAPPERS_C_H_
|
|
#define SCUDO_WRAPPERS_C_H_
|
|
|
|
#include "platform.h"
|
|
#include "stats.h"
|
|
|
|
// Bionic's struct mallinfo consists of size_t (mallinfo(3) uses int).
|
|
#if SCUDO_ANDROID
|
|
typedef size_t __scudo_mallinfo_data_t;
|
|
#else
|
|
typedef int __scudo_mallinfo_data_t;
|
|
#endif
|
|
|
|
struct __scudo_mallinfo {
|
|
__scudo_mallinfo_data_t arena;
|
|
__scudo_mallinfo_data_t ordblks;
|
|
__scudo_mallinfo_data_t smblks;
|
|
__scudo_mallinfo_data_t hblks;
|
|
__scudo_mallinfo_data_t hblkhd;
|
|
__scudo_mallinfo_data_t usmblks;
|
|
__scudo_mallinfo_data_t fsmblks;
|
|
__scudo_mallinfo_data_t uordblks;
|
|
__scudo_mallinfo_data_t fordblks;
|
|
__scudo_mallinfo_data_t keepcost;
|
|
};
|
|
|
|
struct __scudo_mallinfo2 {
|
|
size_t arena;
|
|
size_t ordblks;
|
|
size_t smblks;
|
|
size_t hblks;
|
|
size_t hblkhd;
|
|
size_t usmblks;
|
|
size_t fsmblks;
|
|
size_t uordblks;
|
|
size_t fordblks;
|
|
size_t keepcost;
|
|
};
|
|
|
|
// Android sometimes includes malloc.h no matter what, which yields to
|
|
// conflicting return types for mallinfo() if we use our own structure. So if
|
|
// struct mallinfo is declared (#define courtesy of malloc.h), use it directly.
|
|
#if STRUCT_MALLINFO_DECLARED
|
|
#define SCUDO_MALLINFO mallinfo
|
|
#else
|
|
#define SCUDO_MALLINFO __scudo_mallinfo
|
|
#endif
|
|
|
|
#endif // SCUDO_WRAPPERS_C_H_
|