My programs are getting terminated because the Extended Global Memory (EG) area is too small. I looked at the developer trace files and they have entries such as the ones below:
X *** ERROR => EgAlloc: MmxMalloc failed (9). see also file 'mm.dump'
X *** ERROR => EmIAllocMmResourceEg: EgAlloc(xxxxx) failed 5 [emxx.c
ABAP error "SYSTEM_NO_EG_MEMORY"