Skip to content

Commit

Permalink
Fix build regression
Browse files Browse the repository at this point in the history
Now mimalloc symbols are inside neomimalloc library
  • Loading branch information
Ernesto Castellotti committed Jul 4, 2019
1 parent b8b9ab9 commit b9584e8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
28 changes: 20 additions & 8 deletions dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
"cd $PACKAGE_DIR && git clone --recursive https://github.com/ErnyTech/neomimalloc || true",
"cd $PACKAGE_DIR/neomimalloc/source/mimalloc && rm -rf build && mkdir build && cd build && cmake -DMI_OVERRIDE=OFF .. && make"
],
"sourceFiles": [
"$PACKAGE_DIR/neomimalloc/source/mimalloc/build/libmimalloc.a"
"libs-posix" : [
":libmimalloc.a"
],
"lflags-posix" : [
"-L$PACKAGE_DIR/neomimalloc/source/mimalloc/build"
]
},
{
Expand All @@ -23,8 +26,11 @@
"cd $PACKAGE_DIR && git clone --recursive https://github.com/ErnyTech/neomimalloc || true",
"cd $PACKAGE_DIR/neomimalloc/source/mimalloc && rm -rf build && mkdir build && cd build && cmake -DMI_OVERRIDE=OFF -DMI_SECURE=ON .. && make"
],
"sourceFiles": [
"$PACKAGE_DIR/neomimalloc/source/mimalloc/build/libmimalloc-secure.a"
"libs-posix" : [
":ibmimalloc-secure.a"
],
"lflags-posix" : [
"-L$PACKAGE_DIR/neomimalloc/source/mimalloc/build"
]
},
{
Expand All @@ -33,8 +39,11 @@
"cd $PACKAGE_DIR && git clone --recursive https://github.com/ErnyTech/neomimalloc || true",
"cd $PACKAGE_DIR/neomimalloc/source/mimalloc && rm -rf build && mkdir build && cd build && cmake -DMI_OVERRIDE=ON .. && make"
],
"sourceFiles": [
"$PACKAGE_DIR/neomimalloc/source/mimalloc/build/libmimalloc.a"
"libs-posix" : [
":libmimalloc.a"
],
"lflags-posix" : [
"-L$PACKAGE_DIR/neomimalloc/source/mimalloc/build"
]
},
{
Expand All @@ -43,8 +52,11 @@
"cd $PACKAGE_DIR && git clone --recursive https://github.com/ErnyTech/neomimalloc || true",
"cd $PACKAGE_DIR/neomimalloc/source/mimalloc && rm -rf build && mkdir build && cd build && cmake -DMI_OVERRIDE=ON -DMI_SECURE=ON .. && make"
],
"sourceFiles": [
"$PACKAGE_DIR/neomimalloc/source/mimalloc/build/libmimalloc-secure.a"
"libs-posix" : [
":ibmimalloc-secure.a"
],
"lflags-posix" : [
"-L$PACKAGE_DIR/neomimalloc/source/mimalloc/build"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions source/neomimalloc/mimallocator.d
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ struct Mimallocator {
}

auto sizeOfP = mi_usable_size(p);
result = p[0 .. sizeOfP];
result = (cast(void*) p)[0 .. sizeOfP];
return Ternary.yes;
}

Expand Down Expand Up @@ -233,6 +233,6 @@ struct Mimallocator {
return false;
}

return mi_check_owned(b.ptr);
return mi_check_owned(p);
}
}
}

0 comments on commit b9584e8

Please sign in to comment.