Skip to content

Commit

Permalink
make dev/setSharedMemory.sh a standalone script that can be used by G…
Browse files Browse the repository at this point in the history
…sDevKitStones
  • Loading branch information
dalehenrich committed Nov 15, 2023
1 parent 1e754eb commit 93d51f4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dev/setSharedMemory.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#! /usr/bin/env bash

PLATFORM="`uname -sm | tr ' ' '-'`"
case "$PLATFORM" in
Darwin-arm64) ;;
Darwin-x86_64) ;;
Linux-x86_64)
echo "no need to set up shared memory"
exit 0
;;
*)
echo "This script should only be run on Mac (Darwin-i386 or Darwin-arm64), or Linux (Linux-x86_64) ). The result from \"uname -sm\" is \"`uname -sm`\""
exit 1
;;
esac

totalMem="`sysctl hw.memsize | cut -f2 -d' '`"
# Figure out the max shared memory segment size currently allowed
shmmax="`sysctl kern.sysv.shmmax | cut -f2 -d' '`"
Expand Down

0 comments on commit 93d51f4

Please sign in to comment.