From 7602c8d01e7fce26551037304fa2c65f29e5c892 Mon Sep 17 00:00:00 2001
From: Kristian Lein-Mathisen <kristianlein@gmail.com>
Date: Mon, 5 Sep 2022 21:49:03 +0200
Subject: [PATCH 1/2] gnu: Add mimalloc.
* gnu/packages/engineering.scm (mimalloc): New variable.
---
gnu/packages/engineering.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
@@ -2895,6 +2895,28 @@ (define-public pcb2gcode
dynamic calibration of the milling depth.")
(license license:gpl3+))))
+;; Note there is another mimalloc used in rust-mimalloc (version 1.6.4).
+(define-public mimalloc
+ (package
+ (name "mimalloc")
+ (version "2.0.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/microsoft/mimalloc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05x2dl3zimflfj91ns3vrphmzpdlyyr230p9adqgfds101f16qmv"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:build-type "Release"))
+ (synopsis "General purpose memory allocator")
+ (description "@code{mimalloc} is a drop-in replacement for @code{malloc}.")
+ (home-page "https://microsoft.github.io/mimalloc/")
+ (license license:expat)))
+
(define-public syscall-intercept
;; Upstream provides no tag. Also, last version update is 4 years old.
(let ((commit "304404581c57d43478438d175099d20260bae74e")
base-commit: c4504dfb1da78f2f21fc5139a2fd5e82ed0ef21c
--
2.37.2