shared memory across child process

This is a discussion on shared memory across child process within the Linux Web Servers forums, part of the Web Server and Related Forums category; Has anyone been successful in sharing memory among child processes? I was playing with Apache 2.0.40 and I ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-02-2004
Ahab A.
 
Posts: n/a
Default shared memory across child process

Has anyone been successful in sharing memory among child processes?

I was playing with Apache 2.0.40 and I found apr_shm.h and apr_rmm.h
that looked like they create and manipulate shared memory. It worked
partially for me but I hit a wall with a bug I don't know where it's
comming from.

If you know of any way to share memory, whether from within apache's
api or not, please let me know. It doesn't seem like a small problem
to solve from scratch.

Thanks,
  #2 (permalink)  
Old 03-03-2004
Nick Kew
 
Posts: n/a
Default Re: shared memory across child process

In article <796b5647.0403021410.2a44f600@posting.google.com >,
eabouzou@yahoo.com (Ahab A.) writes:
> Has anyone been successful in sharing memory among child processes?


Why not?

> I was playing with Apache 2.0.40


ferchrissake, upgrade!

> If you know of any way to share memory, whether from within apache's
> api or not, please let me know. It doesn't seem like a small problem
> to solve from scratch.


It isn't. It's complicated by the need to support the different MPMs.
You need to use the APR - anything else will be hopelessly complicated.

You might want to see if you can find Aaron Bannert's presentation on
the APR (titled something like "advanced topics") from ApacheCon 2003.

--
Nick Kew
  #3 (permalink)  
Old 03-03-2004
Ahab A.
 
Posts: n/a
Default Re: shared memory across child process

Thanks for the reply. I did use the apr. I used the following headers:
apr_shmem.h, apr_rmm.h, and apr_global_mutex.h
It worked partially ok for me but I ran into a bug where when memory
gets low, something gets messed up in my pointers which were allocated
from shared memory!
I was thinking maybe I should try my luck with mmap and see how it
goes from there. Any suggestions would be greatly appreciated!

nick@hugin.webthing.com (Nick Kew) wrote in message news:<qbqgh1-06i.ln1@webthing.com>...
> In article <796b5647.0403021410.2a44f600@posting.google.com >,
> eabouzou@yahoo.com (Ahab A.) writes:
> > Has anyone been successful in sharing memory among child processes?

>
> Why not?
>
> > I was playing with Apache 2.0.40

>
> ferchrissake, upgrade!
>
> > If you know of any way to share memory, whether from within apache's
> > api or not, please let me know. It doesn't seem like a small problem
> > to solve from scratch.

>
> It isn't. It's complicated by the need to support the different MPMs.
> You need to use the APR - anything else will be hopelessly complicated.
>
> You might want to see if you can find Aaron Bannert's presentation on
> the APR (titled something like "advanced topics") from ApacheCon 2003.

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:48 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0