> Hi, is there any example mod_slotmem codes that we can understand the > usage? Or could you give me an usage example? Sorry, I can't. I haven't used it myself but someone mentioned it in one of your previous threads.
> And i want to ask a question, > is it a problem to create > > typedef struct node { > ELEMENT node_element; > struct node *left; > struct node *right; > }NODE; > > kind of struct. A struct that has two struct elements. As I said before the pointers will not work if another process attaches to the shared memory segment. If only Apache child processes use the shared memory segment then IMHO the mapping should be the same (as fork() preserves mappings) and it might be safe to use pointers. You will need to take a look at your newNode() function: That will always return the same address; you could keep a counter (inside the shared memory segment) which tells you where to "allocate" the next bytes from. -- Ignaz