I don't have enough points to comment, but here are some clues:
1) Check that your mem parameter is being passed correctly to the kernel. You should be able to do this using cat /proc/cmdline
after you boot as suggested here.
2) Try using quotes around your parameters like "mem=2038M".