add memory to the forked java process