Hi, is there any example mod_slotmem codes that we can understand the
usage? Or could you give me an usage example? For example we are using
apr_shm_create() in post_config, but mod_slotmem is a little bit hard to
understand i think.
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 mentioned
before what i'm trying to implement is a binary tree as a data structure.

regards

Oğuzhan TOPGÜL


On Mon, Nov 28, 2011 at 11:52 PM, Ignaz Birnstingl <ign...@gmail.com> wrote:

> Hi,
>
> apr_shm_baseaddr_get returns the base address for the shared memory
> segment. You will have to implement your own "allocator" within the shared
> memory. Also keep in mind that you can't reliably use pointers inside the
> shared memory segment, because - as the documentation states - the address
> returned by apr_shm_baseaddr_get "is only usable within the callers address
> space, since this API does not guarantee that other attaching processes
> will maintain the same address mapping."
> Inter- and intra-process synchronization will be problems you will
> encounter later on.
> Btw Apache 2.3 offers mod_slotmem which helps in using shared memory -
> maybe you should have a look at it?
>
> -- Ignaz
>

Reply via email to