Skip to content

Commit

Permalink
Fix num_devices:Number of zram devices - has uint type(max 32). This …
Browse files Browse the repository at this point in the history
…commit add min(ncpu,32) to calc cpu count function
  • Loading branch information
eugenepaniot committed Jan 23, 2017
1 parent f662370 commit 6642693
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions zramstart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

num_cpus=$(nproc)
num_cpus=$(($num_cpus<32?$num_cpus:32))
[ "$num_cpus" != 0 ] || num_cpus=1

last_cpu=$((num_cpus - 1))
Expand Down

0 comments on commit 6642693

Please sign in to comment.