Does someone have tutorial and some source code (insert + delete item) ???
Type: Posts; User: tritong
Does someone have tutorial and some source code (insert + delete item) ???
int rc = write(socket, str, strlen(str));
maximum can use (strlen(str)) = ?
Does it greater than 4096 ???
The title is my question ???
Thanks so much.
Because I use it but not remove it after run. So I change the seg size and compile, it occurs error.
I have solved it.
Can I write one struct to share memory ??
struct test...
I use FreeBSD 6.0
The man page do not show that.
Size of segment :
#define SHMSZ 27
if ((shmid = shmget(key, SHMSZ, IPC_CREAT | 0666)) < 0)
{
With 2 c files, they use 1 memory area. How to set limit memory for them ???
I use library shm.h and its func (shmget, shmat, shmctl ... ). When i share memory for another, i don't know how to...
This is the include file test.h
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>