Go to JDEV_HOME\system12.1.2.0.40.66.68\DefaultDomain\bin and open setDomainEnv.cmd or setDomainEnv.sh based on whether it is a windows or linux machine.
Scroll down until you see WLS_MEM_ARGS, below that enter
In the case of Windows:
set USER_MEM_ARGS = -Xms64m -Xmx2048m -XX:MaxPermSize=1024m
In the case of Linux:
USER_MEM_ARGS="-Xms64m -Xmx2048m -XX:MaxPermSize=1024m"
export USER_MEM_ARGS
Scroll down until you see WLS_MEM_ARGS, below that enter
In the case of Windows:
set USER_MEM_ARGS = -Xms64m -Xmx2048m -XX:MaxPermSize=1024m
In the case of Linux:
USER_MEM_ARGS="-Xms64m -Xmx2048m -XX:MaxPermSize=1024m"
export USER_MEM_ARGS