I have a structure
typedef struct my_s {
int x;
...
} my_T;
my_t * p_my_t;
I want to set the address of p_my_t
to
If I get it right, memset won't solve your problem. If A and B are separate processes, then p_my_t
in process A will be different form p_my_t
in process B. You just can't pass a pointer between different processes. I sugest you use some kind of IPC mechanism in order to sinchronyze your two processes (message queues, for example), and just using p_my_t = NULL
instead of memset.