Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions contrib/mimalloc-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "translate_new"
version = "0.1.0"
edition = "2021"

[dependencies]
lazy_static = "1.4.0"
libc = "0.2"

[[bin]]
name="test-stress"
path="src/test_stress_main.rs"

[[bin]]
name="test-api-fill"
path="src/test_api_fill_main.rs"

[[bin]]
name="test-api"
path="src/test_api_main.rs"
7 changes: 7 additions & 0 deletions contrib/mimalloc-rs/src/__fsid_t.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use crate::*;

#[derive(Clone)]
pub struct __fsid_t {
pub __val: [i32; 2],
}

7 changes: 7 additions & 0 deletions contrib/mimalloc-rs/src/__kernel_fd_set.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use crate::*;

#[derive(Clone)]
pub struct __kernel_fd_set {
pub fds_bits: [u64; 1024 / (8 * std::mem::size_of::<u64>())],
}

7 changes: 7 additions & 0 deletions contrib/mimalloc-rs/src/__kernel_fsid_t.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use crate::*;

#[derive(Clone)]
pub struct KernelFsidT {
pub val: [i32; 2],
}

5 changes: 5 additions & 0 deletions contrib/mimalloc-rs/src/__kernel_sighandler_t.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use crate::*;


pub struct __kernel_sighandler_t(pub Option<Box<dyn Fn(i32)>>);

15 changes: 15 additions & 0 deletions contrib/mimalloc-rs/src/__priority_which.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use crate::*;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PriorityWhich {
Process = 0,
Pgrp = 1,
User = 2,
}

impl PriorityWhich {
pub const PRIO_PROCESS: Self = Self::Process;
pub const PRIO_PGRP: Self = Self::Pgrp;
pub const PRIO_USER: Self = Self::User;
}

30 changes: 30 additions & 0 deletions contrib/mimalloc-rs/src/__rlimit_resource.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
use crate::*;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RlimitResource {
RlimitCpu = 0,
RlimitFsize = 1,
RlimitData = 2,
RlimitStack = 3,
RlimitCore = 4,
__RlimitRss = 5,
RlimitNofile = 7,
RlimitAs = 9,
__RlimitNproc = 6,
__RlimitMemlock = 8,
__RlimitLocks = 10,
__RlimitSigpending = 11,
__RlimitMsgqueue = 12,
__RlimitNice = 13,
__RlimitRtprio = 14,
__RlimitRttime = 15,
__RlimitNlimits = 16,
}

pub struct RlimitConstants;

impl RlimitConstants {
pub const __RLIMIT_OFILE: RlimitResource = RlimitResource::RlimitNofile;
pub const __RLIM_NLIMITS: RlimitResource = RlimitResource::__RlimitNlimits;
}

8 changes: 8 additions & 0 deletions contrib/mimalloc-rs/src/__rusage_who.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::*;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum __rusage_who {
RUSAGE_SELF = 0,
RUSAGE_CHILDREN = -1,
}

Loading