Update to 0.1.38 (rhbz#2276528)

Signed-off-by: Michel Lind <salimma@fedoraproject.org>
This commit is contained in:
Michel Lind 2024-05-30 23:05:23 -05:00
commit 5acfab598e
No known key found for this signature in database
GPG key ID: 8B229D2F7CCC04F2
5 changed files with 70 additions and 4 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/libmimalloc-sys-0.1.30.crate
/libmimalloc-sys-0.1.33.crate
/libmimalloc-sys-0.1.35.crate
/libmimalloc-sys-0.1.38.crate

View file

@ -0,0 +1,36 @@
--- a/src/extended.rs
+++ b/src/extended.rs
@@ -1014,6 +1014,16 @@ mod tests {
use super::*;
#[test]
+ fn it_calculates_usable_size() {
+ let ptr = unsafe { mi_malloc(32) } as *mut u8;
+ let usable_size = unsafe { mi_usable_size(ptr as *mut c_void) };
+ assert!(
+ usable_size >= 32,
+ "usable_size should at least equal to the allocated size"
+ );
+ }
+
+ #[test]
fn runtime_stable_option() {
unsafe {
assert_eq!(mi_option_get(mi_option_show_errors), 0);
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -89,14 +89,4 @@ mod tests {
let ptr = unsafe { mi_realloc_aligned(ptr as *mut c_void, 8, 8) } as *mut u8;
unsafe { mi_free(ptr as *mut c_void) };
}
-
- #[test]
- fn it_calculates_usable_size() {
- let ptr = unsafe { mi_malloc(32) } as *mut u8;
- let usable_size = unsafe { mi_usable_size(ptr as *mut c_void) };
- assert!(
- usable_size >= 32,
- "usable_size should at least equal to the allocated size"
- );
- }
}

View file

@ -1,23 +1,27 @@
# Generated by rust2rpm 25
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}
%global crate libmimalloc-sys
Name: rust-libmimalloc-sys
Version: 0.1.35
Version: 0.1.38
Release: %autorelease
Summary: Sys crate wrapping the mimalloc allocator
License: MIT
URL: https://crates.io/crates/libmimalloc-sys
Source: %{crates_source}
# https://github.com/purpleprotocol/mimalloc_rust/pull/122
Patch: %{crate}-fix-usable-size-gating.diff
BuildRequires: cargo-rpm-macros >= 24
# TODO: get this to build against system mimalloc
# or ask mimalloc dev to switch to mimalloc-sys
Provides: bundled(mimalloc) = 2.1.2
# https://github.com/purpleprotocol/mimalloc_rust/issues/73
# see MI_MALLOC_VERSION in mimalloc/include/mimalloc.h
Provides: bundled(mimalloc) = 2.1.6
%global _description %{expand:
Sys crate wrapping the mimalloc allocator.}
@ -50,6 +54,18 @@ use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+arena-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+arena-devel %{_description}
This package contains library source intended for building other packages which
use the "arena" feature of the "%{crate}" crate.
%files -n %{name}+arena-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+cty-devel
Summary: %{summary}
BuildArch: noarch
@ -110,6 +126,18 @@ use the "local_dynamic_tls" feature of the "%{crate}" crate.
%files -n %{name}+local_dynamic_tls-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+no_thp-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+no_thp-devel %{_description}
This package contains library source intended for building other packages which
use the "no_thp" feature of the "%{crate}" crate.
%files -n %{name}+no_thp-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+override-devel
Summary: %{summary}
BuildArch: noarch

1
series Normal file
View file

@ -0,0 +1 @@
libmimalloc-sys-fix-usable-size-gating.diff

View file

@ -1 +1 @@
SHA512 (libmimalloc-sys-0.1.35.crate) = 7f9ef551d23d7e22073cf9d8593103a4ca17cf82b65b2bc1404dbfc2cec46c4f305ad9dfda9ca1c61e7ff3a617196c6798f505d62c90552dd25b4ba0c05e5847
SHA512 (libmimalloc-sys-0.1.38.crate) = 3b0416b06a4692be364b75e324a312e0160f64f8a49930d3e0eb6fb201982b59482f636fca774a254aead6112168acd3d307c2a79c5ce3be3213850c172a7bf9