How to Create a Shared Memory Segment for Inter Process

How to Create a Shared Memory Segment for Inter Process Communication [Producer Consumer in IPC]