A method is provided for managing memory resources in a service gateway environment.
The method includes: receiving a service request, the service request having an
associated memory space requirement that exceeds total available memory space associated
with the gateway environment; determining a number of dependent service instances
for each service instance; determining an accumulative memory space requirement
for each service instance; identifying a subset of service instance whose memory
space requirement exceeds the memory space requirement of the service request,
the subset having a minimal number of the service instances; and performing a memory
resource management operation in relation to the identified subset of service instances.