I was running the script OptionsSimulate.c, changed StartDate and EndDate. The file is from https://financial-hacker.com/scripts2017.zip

Updated the script as below, its working okay now.
// StartDate = 20190101; EndDate = 20200630; -- this gave me memory issue
StartDate = 2019; EndDate = 2020;