Problem opening shared memory

I am not able to open shared memory created in a different process

shm_open method is returning is error no as EMFILE (Too many file descriptors are currently in use by this process).

Please help me with the possible reasons of the problem and possible solution.

Thanks in advance.

Not enough information. If it`s really an EMFILE error that means your code is opening to many files and not closing them.

We need to see some code ;-)