Skip to content

Commit ef2493b

Browse files
committed
fix(sys): c binding
1 parent d10b2c0 commit ef2493b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ jobs:
100100
run: cargo rustdoc -- -D warnings
101101

102102
- name: 'Check documentation links in `libmimalloc-sys`'
103-
run: cargo rustdoc -p libmimalloc-sys -- -D warnings
103+
run: cargo rustdoc -p libmimalloc-sys2 -- -D warnings

libmimalloc-sys/src/extended.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ pub const mi_option_show_stats: mi_option_t = 1;
488488
pub const mi_option_verbose: mi_option_t = 2;
489489

490490
/// ### The following options are experimental
491-
491+
///
492492
/// Option (experimental) Use large OS pages (2MiB in size) if possible.
493493
///
494494
/// Use large OS pages (2MiB) when available; for some workloads this can
@@ -546,7 +546,7 @@ pub const mi_option_max_warnings: mi_option_t = 20;
546546
pub const mi_option_max_segment_reclaim: mi_option_t = 21;
547547

548548
/// Last option.
549-
pub const _mi_option_last: mi_option_t = 29;
549+
pub const _mi_option_last: mi_option_t = 36;
550550

551551
extern "C" {
552552
// Note: mi_option_{enable,disable} aren't exposed because they're redundant
@@ -657,6 +657,8 @@ pub struct mi_heap_area_t {
657657
pub block_size: usize,
658658
/// Size in bytes of a full block including padding and metadata.
659659
pub full_block_size: usize,
660+
/// Heap tag associated with this area (see \a mi_heap_new_ex)
661+
pub heap_tag: c_int,
660662
}
661663

662664
/// Visitor function passed to [`mi_heap_visit_blocks`]
@@ -1012,6 +1014,7 @@ extern "C" {
10121014
#[cfg(test)]
10131015
mod tests {
10141016
use super::*;
1017+
use crate::mi_malloc;
10151018

10161019
#[test]
10171020
fn it_calculates_usable_size() {

libmimalloc-sys/sys-test/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ description = "Bindings test for libmimalloc-sys"
77
license = "MIT"
88
publish = false
99

10+
[features]
11+
secure = ["libmimalloc-sys2/secure"]
12+
extended = ["libmimalloc-sys2/extended"]
13+
1014
[dependencies]
1115
libmimalloc-sys2 = { path = "..", features = ["extended"] }
1216
libc = "0.2"

0 commit comments

Comments
 (0)