apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: cvs commit: apr/shmem/unix shm.c
Date Mon, 04 Mar 2002 16:55:36 GMT
On Mon, Mar 04, 2002 at 11:42:55AM -0500, Jeff Trawick wrote:
> trawick@apache.org writes:
> 
> > trawick     02/03/04 08:40:58
> > 
> >   Modified:    shmem/unix shm.c
> >   Log:
> >   preserve the proper alignment when we use the start of the shared
> >   memory for metadata
> >   
> 
> >   +/*
> >   +         XXX use APR_ALIGN_DEFAULT() somewhere here?
> >   +         XXX do we need to seek() prior to the mmap()?
> >   +*/
> >   +
> >            nbytes = sizeof(new_m->realsize);
> >            status = apr_file_read(file, (void *)&(new_m->realsize),
> >                                   &nbytes);
> 
> Perhaps whoever wrote this could take a look at the section of code
> where I added that comment?

I was already looking... :)

A seek shouldn't be necessary, since we create the segment size while
taking into account padding for that "realsize" value, and then we just
push the "usable" pointer past that padding.

IOW, I think you did it correctly.

-aaron


Mime
View raw message