I'm trying to share a struct similar to the following example:
typedef struct {
int *a;
int b;
int c;
} example;
I'm trying to share this struct between processes, the problem that I find is that when I initialize 'a' with malloc, I won't be able to access the array from within the second process. Is it possible to add this dynamic array to the memory mapped file?
Aucun commentaire:
Enregistrer un commentaire