Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Parallel Processing ProgramsRSS Feeds

PROGRAM OF CREATE HEADER FILE FOR SHARED MEMORY

Posted By: Hedwig Miller     Category: C Programming     Views: 3788

PROGRAM OF CREATE HEADER FILE FOR SHARED MEMORY.

Code for PROGRAM OF CREATE HEADER FILE FOR SHARED MEMORY in C Programming

#include<sys/ipc.h>
#include<sys/shm.h>
#include<sys/types.h>

int *shared(int x,int *shmid)
 {
 
   *shmid=shmget(IPC_PRIVATE,x,0666|IPC_CREAT);

   return(shmat(*shmid,0,0));
   
 }

/*void free_shm(int id)
{
struct shmid_ds *buf;

if(shmctl(id,IPC_RMID,buf)!=0)
error_exit("free_shm","shmctl");
}*/
  
Share: 


Didn't find what you were looking for? Find more on PROGRAM OF CREATE HEADER FILE FOR SHARED MEMORY Or get search suggestion and latest updates.

Hedwig Miller
Hedwig Miller author of PROGRAM OF CREATE HEADER FILE FOR SHARED MEMORY is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!