Commit 4758e76
committed
Import the source code of mimalloc v2.2.3
Update to newer mimalloc versions like this:
update_mimalloc ()
{
test $# = 1 || {
echo "Need a mimalloc version" 1>&2;
return 1
};
for oneline in 'mimalloc: adjust for building inside Git' 'Import the source code of mimalloc';
do
git revert -n HEAD^{/^"$oneline"} && git checkout HEAD -- Makefile && git commit -sm "Temporarily revert \"$oneline\"" -m 'In preparation for upgrading to a newer mimalloc version.' || return 1;
done;
for file in $(git show --format='%n' --name-only --diff-filter=A HEAD^{/^"Import the source code of mimalloc "}) compat/mimalloc/arena-abandon.c compat/mimalloc/free.c compat/mimalloc/libc.c compat/mimalloc/prim/prim.c compat/mimalloc/mimalloc-stats.h;
do
file2=${file#compat/mimalloc/};
case "$file2" in
segment-cache.c)
: no longer needed;
continue
;;
bitmap.h | *.c)
file2=src/$file2
;;
*.h)
file2=include/$file2
;;
esac;
mkdir -p "${file%/*}" && git -C /usr/src/mimalloc/ show "$1":$file2 > "$file" && git add "$file" || {
echo "Failed: $file2 -> $file" 1>&2;
return 1
};
done;
conv_sed='sed -n "/^ *eval/d;/ /p"' && git commit -sm "Import the source code of mimalloc $1" -m "Update to newer mimalloc versions like this:" -m "$(set | sed -n '/^update_mimalloc *() *$/,/^}/{s/^./ &/;p}')" -m ' update_mimalloc $MIMALLOC_VERSION' -m 'For convenience, you can set `MIMALLOC_VERSION` and then run:' -m ' eval "$(git show -s <this-commit> | '"$conv_sed"')"' || return 1;
git cherry-pick HEAD^{/^'mimalloc: adjust for building inside Git'} || return 1
}
update_mimalloc $MIMALLOC_VERSION
For convenience, you can set `MIMALLOC_VERSION` and then run:
eval "$(git show -s <this-commit> | sed -n "/^ *eval/d;/ /p")"
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 35f1bec commit 4758e76
File tree
28 files changed
+15477
-0
lines changed- compat/mimalloc
- mimalloc
- prim
- windows
28 files changed
+15477
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Large diffs are not rendered by default.
0 commit comments