BAM:could not reserve enough space for object heap

While starting the BAM server like thisĀ (startManagedWebLogic.cmd bam_server1) in the command prompt,sometimes you may get the following error,
could not reserve enough space for object heap windows.

Steps to resolve this error:

1. Goto setSOADoainEnv.cmd ,located at user_projects\domains\domain1\bin\ folder
2. Then edit the file by changing
set DEFAULT_MEM_ARGS=-Xms512m -Xmx1024m
to
set DEFAULT_MEM_ARGS=-Xms256m -Xmx512m
3. Save it and restart the servers again.