R
Ron Eggler
Hi,
I'm running an application on an embedded PC 104 platform on a Linux OS.
I need some shared memory and I'm trying to create it with:
int prg_shm = ::shmget(0x1999,sizeof(struct configuration),0666);
if (prg_shm == -1)
{
prg_shm = ::shmget(0x1999,sizeof(struct configuration),IPC_CREAT|0666);
if (prg_shm == -1)
{
std::cerr << "Failed to create shared memory area!\n";
::exit(EXIT_FAILURE);
}
}
But I always get ""Failed to create shared memory area!" and I'm not seeing
what's wrong. Any suggestions?
Thanks!
Ron
I'm running an application on an embedded PC 104 platform on a Linux OS.
I need some shared memory and I'm trying to create it with:
int prg_shm = ::shmget(0x1999,sizeof(struct configuration),0666);
if (prg_shm == -1)
{
prg_shm = ::shmget(0x1999,sizeof(struct configuration),IPC_CREAT|0666);
if (prg_shm == -1)
{
std::cerr << "Failed to create shared memory area!\n";
::exit(EXIT_FAILURE);
}
}
But I always get ""Failed to create shared memory area!" and I'm not seeing
what's wrong. Any suggestions?
Thanks!
Ron