Update miner.cpp

1. Added support for scratchpad memory allocation.