Description: fix autopkgtest failure on 32-bit architectures The memory calculation system may erroneously attribute far more memory than is addressable on 32-bit platforms. This adjustment makes sure the calculated amount of RAM is capped appropriately on such platforms. Author: Étienne Mollier Forwarded: no Last-Update: 2021-10-06 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- bbmap.orig/calcmem.sh +++ bbmap/calcmem.sh @@ -209,6 +209,11 @@ # available (ram - 500k) * 85% / 1024kb = megs of ram to use # not sure where this formula came from RAM=$(( ((x-500000)*mult/100)/1024 )) + # cap to 2.2GiB on 32bit systems + if [ "$(dpkg-architecture -qDEB_HOST_ARCH_BITS)" = 32 ] \ + && [ "$RAM" -gt "2000" ] + then RAM="2000" + fi #echo $RAM fi #local z="-Xmx${RAM}m"