Actually, it can be.. it could be any of -Xmx:size[g|G|m|M|k|K]

http://docs.oracle.com/cd/E15289_01/doc.40/e15062/optionx.htm#i1027399
This means I need to divide accordingly, I will update this code.