C - shared memory - dynamic array inside shared struct

前端 未结 5 1682
攒了一身酷
攒了一身酷 2020-12-09 17:50

i\'m trying to share a struct like this
example:

typedef struct {
    int* a;
    int b;
    int c;
} ex;

between processes, the prob

5条回答
  •  被撕碎了的回忆
    2020-12-09 18:35

    Are you working in Windows or Linux? In any case what you need is a memory mapped file. Documentation with code examples here,

    http://msdn.microsoft.com/en-us/library/aa366551%28VS.85%29.aspx http://menehune.opt.wfu.edu/Kokua/More_SGI/007-2478-008/sgi_html/ch03.html

提交回复
热议问题