Skip to content

Commit

Permalink
Alloc (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling authored Sep 11, 2021
1 parent f30287f commit 060d6b3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
avx2: On
webui: On
tests: Off
mimalloc: Off
strip: strip
- name: macos-noavx2
cxx: clang++
Expand All @@ -64,6 +65,7 @@ jobs:
avx2: Off
webui: On
tests: On
mimalloc: Off
strip: strip
- name: linux-amd64-debug
cxx: g++-10
Expand All @@ -74,6 +76,7 @@ jobs:
avx2: On
webui: Off
tests: On
mimalloc: Off
emulator: valgrind --error-exitcode=1
install: ninja-build valgrind
- name: linux-amd64-clang
Expand All @@ -87,6 +90,7 @@ jobs:
avx2: On
webui: Off
tests: On
mimalloc: Off
install: ninja-build
- name: linux-clang-tidy
cxx: clang++-12
Expand All @@ -100,6 +104,7 @@ jobs:
avx2: On
webui: Off
tests: On
mimalloc: Off
install: ninja-build
- name: linux-clang-sanitizer
cxx: clang++-12
Expand All @@ -113,6 +118,7 @@ jobs:
avx2: On
webui: Off
tests: On
mimalloc: Off
install: ninja-build
- name: linux-amd64-release
os: ubuntu-20.04
Expand All @@ -130,6 +136,7 @@ jobs:
avx2: On
webui: On
tests: On
mimalloc: On
strip: /opt/x86_64-multilib-linux-musl/x86_64-multilib-linux-musl/bin/strip
install: ninja-build
- name: linux-amd64-noavx-release
Expand All @@ -148,6 +155,7 @@ jobs:
avx2: Off
webui: On
tests: On
mimalloc: Off
strip: /opt/x86_64-multilib-linux-musl/x86_64-multilib-linux-musl/bin/strip
install: ninja-build
- name: linux-x86-release
Expand All @@ -170,6 +178,7 @@ jobs:
avx2: Off
webui: On
tests: On
mimalloc: Off
strip: /opt/x86_64-multilib-linux-musl/x86_64-multilib-linux-musl/bin/strip
install: ninja-build
- name: linux-arm-release
Expand All @@ -191,6 +200,7 @@ jobs:
avx2: Off
webui: On
tests: On
mimalloc: Off
strip: /opt/arm-unknown-linux-musleabihf/arm-unknown-linux-musleabihf/bin/strip
install: ninja-build qemu-user-static
emulator: qemu-arm-static
Expand All @@ -213,6 +223,7 @@ jobs:
avx2: Off
webui: On
tests: On
mimalloc: Off
strip: /opt/aarch64-unknown-linux-musl/aarch64-unknown-linux-musl/bin/strip
install: ninja-build qemu-user-static
emulator: qemu-aarch64-static
Expand Down Expand Up @@ -289,6 +300,7 @@ jobs:
-DMOTIS_LINT=${{ matrix.config.lint }} \
-DMOTIS_AVX=${{ matrix.config.avx }} \
-DMOTIS_AVX2=${{ matrix.config.avx2 }} \
-DMOTIS_MIMALLOC=${{ matrix.config.mimalloc }} \
-DCTX_ASAN=${{ contains(matrix.config.cxxflags, '-fsanitize=address') }} \
-DCTX_VALGRIND=${{ matrix.config.cc == 'gcc-10' && matrix.config.mode == 'Debug' }} \
-DMOTIS_WITH_WEBUI=${{ matrix.config.webui }}
Expand Down
6 changes: 5 additions & 1 deletion .pkg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[cista]
[email protected]:felixguendling/cista.git
branch=master
commit=fb4d35eeb72e86cd3768a896f5068fc6ba31b5e8
commit=eb1b0199eef401493db0d2dd735a14481b823083
[conf]
[email protected]:motis-project/conf.git
branch=master
Expand Down Expand Up @@ -86,3 +86,7 @@
[email protected]:motis-project/boost.git
branch=master
commit=bca212ca286121db1e7eb2efa9ee8de626633481
[mimalloc]
[email protected]:motis-project/mimalloc.git
branch=master
commit=076f815cece59e0a0ee08237c8fbba75465452b6
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ endif()

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

option(MOTIS_MIMALLOC "use mimalloc" OFF)
option(MOTIS_AVX "enable AVX functions" ON)
option(MOTIS_AVX2 "enable AVX2 + FMA functions" ON)

Expand Down Expand Up @@ -97,6 +98,9 @@ configure_file (
################################
find_package(Threads)
include(cmake/pkg.cmake)
if (MOTIS_MIMALLOC)
target_link_libraries(cista INTERFACE mimalloc-static)
endif()
add_subdirectory(modules/ris/gtfsrtpb)


Expand Down Expand Up @@ -195,6 +199,10 @@ endforeach(module)
add_subdirectory(base/bootstrap EXCLUDE_FROM_ALL)
add_subdirectory(base/launcher)

if (MOTIS_MIMALLOC)
target_link_libraries(motis mimalloc-obj)
endif()

if(MOTIS_WITH_WEBUI)
add_subdirectory(ui/web)
endif()
Expand Down

0 comments on commit 060d6b3

Please sign in to comment.