Re: Question about mmap wrt compressed files



How is a wrapper to mmap() going to help? Unless you have wrappers for
all reads/writes to that mmap'd memory, wouldn't you need to intercept
the page fault handler in the kernel in order to do things
transparently to the app as compared to how they are now? That is,
you'd custom mmap the region but individual pages/comprssion blocks are
invalid until decompressed and constructed as needed.

A lot really depends on your app. A while back I wrote an app that did
exactly what you mention where it decompresses gzip/bzip2 data into an
mmap'd region. I did this in order to minimize code tear-up, but yes,
there is a decompression speed hit on initialization. You could try
mmap'ing to /dev/zero as this would keep you from having to generate a
real file, but considering the caching the filesystem does, it'd
probably make no difference or could even be slower than using files.
*shrugs*

-t

.



Relevant Pages

  • Re: Question about mmap wrt compressed files
    ... > How is a wrapper to mmapgoing to help? ... > you'd custom mmap the region but individual pages/comprssion blocks are ... > A lot really depends on your app. ... > exactly what you mention where it decompresses gzip/bzip2 data into an ...
    (comp.compression)
  • Re: page fault scalability patch final : i386 tested, x86_64 support added
    ... > app can mmap the same page 4G times and can then munmap it once. ... but the same kind of app can also do this on 32-bit architectures. ... I think it would be better to check for overflow of the atomic_t (atomic_t ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: IWMHeaderInfo::GetAttributeByIndex fails with buffer too small
    ... This takes the aproach of converting the app ... Reference the orginal csharp wrapper. ... > I have translated the WMFSDKWrapper from the managed code example in ... > The GetAttributeByIndex functions is defined as follows: ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: IWMHeaderInfo::GetAttributeByIndex fails with buffer too smal
    ... I modified the GetAttributeByIndex definition to pass ByVal pointers to ... wszName and Value rather then ByRef inclusions of the variables themselves. ... This takes the aproach of converting the app ... > Reference the orginal csharp wrapper. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: MSFlexGrid in simple ATL container window doesnt accept keystrokes
    ... a wrapper, not an app and it uses an old version of ATL and won't build ... As a wrapper, we don't have access to the event loop. ... Surely getting the keyboard to work ... turns out the control is irrelevant. ...
    (microsoft.public.win32.programmer.ole)