Shared memory allocation library for applications with pre-forked process model