0

I wanted to access the shared memory of a Tuxedo application. So, I used shmget(key,0,0) in my code. It is returning error with error code 34, Result too large. My machine is a Windows server 2008 64 bit one. I searched many forums but couldn't know the reason for this issue. Any help is much appreciated. Below is the part of code:

if ( (shmid=shmget(shmkey, 0, 0)) == INVALID_IPC) 
{
LOG_SYS_ERR((TUX_FAILED_CONNECT_TO_SHM,shmkey));
return PCS_RC_ERROR;
}

I used visual studio 2010 to compile

  • Please provide your code for the `shmget` call and error handling, including declaration of the parameter variables. Also, which compiler are you using? – Klas Lindbäck Nov 18 '14 at 08:50
  • Why are you trying to allocate shared memory block of zero bytes? In Unix it's an error, the SHMMIN is 1 (and effectively - PAGE_SIZE). – Tomo Nov 18 '14 at 09:21
  • This may help: http://stackoverflow.com/questions/22262029/how-to-attach-to-an-existing-shared-memory-segment – Klas Lindbäck Nov 18 '14 at 09:30
  • I am not creating the shared memory. Just trying to access already existing memory. Hence using 0 to get the shmid. – user2647674 Nov 18 '14 at 09:34
  • This is for a windows machine, not a unix machine. – user2647674 Nov 20 '14 at 07:51

0 Answers0