Under Ubuntu: First install the packet "hugepages":
Code: Select all
sudo apt-get install hugepagesCode: Select all
hugectl --heap stockfishCode: Select all
LD_PRELOAD=libhugetlbfs.so HUGETLB_MORECORE=thp stockfishCode: Select all
! /bin/sh
#export LD_PRELOAD=libhugetlbfs.so HUGETLB_MORECORE=thp
#exec stockfish "$@"
hugectl --heap stockfish "$@"This works by intercepting the dynamic calls to malloc, therefore it should work for any engine.