[PATCH] Request review for KSharedDataCache (Round 2)

Michael Pyne mpyne at kde.org
Wed Apr 28 21:53:43 BST 2010


On Wednesday, April 28, 2010 07:22:15 Brad Hards wrote:
> On Wednesday 28 April 2010 08:20:37 pm Oswald Buddenhagen wrote:
> > > > > +    enum EvictionPolicy
> > > > > +    {
> > > > > +        // It's important that the default value be 0 due to
> > > > > mmap().
> > > > 
> > > > grammar
> > > 
> > > I actually disagree this time, but I will remove the contraction to
> > > make it clear (i.e. "It is important that the default value be 0, due
> > > to mmap()")
> > 
> > i meant "that the [...] value _be_ 0". i don't know whether this is
> > actually wrong, but i usually see this in constructs which are
> > artificially arcane/wrong. more compliant with my perception of
> > correctness would be "is".
> 
> I think either is OK. A more direct approach would be something like
> "The default value must be 0, since it will be passed to mmap()"

Well, this value won't be passed to mmap(), but the result of mmap() if it 
creates the initial mapping is that the value that will be in memory when the 
eviction policy is accessed will be 0. Therefore whatever we select for the 
default value should also be 0.

Although I suppose that strictly speaking since we use file-backed shared 
memory instead of anonymous pages that the value was set to 0 by ftruncate() 
and not mmap(). But either way... ;)

I will try to re-word it to be more clear.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100428/29b0433d/attachment.sig>


More information about the kde-core-devel mailing list