You need to add the following lines in your catalina.sh
file.
export CATALINA_OPTS="-Xms512M -Xmx1024M"
UPDATE : catalina.sh
content clearly says -
Do not set the variables in this script. Instead put them into a script setenv.sh in CATALINA_BASE/bin to keep your customizations separate.
So you can add above in setenv.sh instead (create a file if it does not exist).