httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: SYSV Shared Memory (Was: Re: vote status)
Date Thu, 15 Feb 1996 23:13:39 GMT
Ben Laurie wrote:
> Jim Jagielski wrote:
> > 
> > I've placed on ftp.apache.org in /httpd/patches/for_Apache_misc my
> > first rough-cut at using SYSV shared mem. It's called: shared_mem.patch
> > 
> > It's got some limitations due to the way it's implemented, but it's
> > working. It might be a good starting point.
> > 
> I note that you can specify an address to shmat(), but I'm not sure what
> a suitable choice for that might be (sbrk(0)+1 GB?)? Ah, I see you mention that
> in points 2 & 3 (sort of), see below.
> 
> >    2) Figure out a way to use the "give shmat() an actual address to
> >       use as the 2nd parameter in the system call"... I haven't
> >       been able to figure this out yet... I allocated a chunk of
> >       space and use a pointer to it as the value, but shmat() fails
> >       with an Invalid Parameter error... Maybe because the allocated
> >       space is < a segment size ????
> 
> No, because the space is already in use... (freeing won't help either).

Ack! You mean if a malloc() some space and grab a pointer to it,
I can't use that address as where I want shmat() to map the segment
to because it's considered "in use"? Ugggg... How incredibly
lame.

So it's either use sbrk() or a system of shmat/use/shmdt... Geez. How
crude.
-- 
Jim Jagielski  << jim@jaguNET.com >>   |      "That's a Smith & Wesson,
  **  jaguNET Access Services  **      |       and you've had your six" 
      Email: info@jaguNET.com          |             - James Bond
++    http://www.jaguNET.com/         +++      Voice/Fax: 410-931-7060       ++

Mime
View raw message