Sun Studio 12: Debugging a Program With dbx

Out of Memory (oom) Error

Problem: Attempt to allocate memory beyond physical memory available.

Cause: Program cannot obtain more memory from the system. Useful in locating problems that occur when the return value from malloc() is not checked for NULL, which is a common programming mistake.


char *ptr = (char *)malloc(0x7fffffff);
/* Out of Memory (oom), ptr == NULL */