Skip to content

Commit

Permalink
fix: fix zmalloc_size on macos (#2646)
Browse files Browse the repository at this point in the history
* fix: fix zmalloc_size on macos

---------
Signed-off-by: Roman Gershman <[email protected]>
Co-authored-by: Roman Gershman <[email protected]>
  • Loading branch information
andydunstall authored Feb 23, 2024
1 parent 3d27913 commit 47171c4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
df -h
- name: Run sccache-cache
uses: mozilla-actions/[email protected].3
uses: mozilla-actions/[email protected].4

- name: Configure Cache Env
uses: actions/github-script@v6
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/daily-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
with:
submodules: true
- name: Run sccache-cache
uses: mozilla-actions/[email protected].3
uses: mozilla-actions/[email protected].4

- name: Configure Cache Env
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand Down Expand Up @@ -73,10 +73,20 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: Configure Cache Env
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
- name: Install dependencies
run: |
brew update && brew install ninja boost openssl automake gcc zstd bison c-ares \
autoconf libtool automake
autoconf libtool automake flatbuffers
# brew info icu4c
mkdir -p $GITHUB_WORKSPACE/build
Expand All @@ -92,7 +102,8 @@ jobs:
echo "*************************** START BUILDING **************************************"
CC=gcc-13 CXX=g++-13 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF
CC=gcc-13 CXX=g++-13 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=sccache
ninja src/all
Expand Down
2 changes: 1 addition & 1 deletion helio
4 changes: 4 additions & 0 deletions src/redis/zmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
#elif defined(__APPLE__)
#include <malloc/malloc.h>
#define HAVE_MALLOC_SIZE 1
#ifdef USE_ZMALLOC_MI
#define zmalloc_size(p) zmalloc_usable_size(p)
#else
#define zmalloc_size(p) malloc_size(p)
#endif
#define ZMALLOC_LIB "macos"
#endif

Expand Down

0 comments on commit 47171c4

Please sign in to comment.