get stack grow address direction by recursive function