Re: Moving pages around, (overlapped IO)

From: Peter Below (TeamB) (100113.1101_at_compuXXserve.com)
Date: 11/08/03

  • Next message: Kurt Barthelmess: "Re: Window Messages"
    Date: Sat, 08 Nov 2003 12:29:51 +0100
    
    

    In article <3facb5e8@newsgroups.borland.com>, Martin James wrote:
    > Suppose I had a collection of 4k buffers. These buffers belong to a pool in
    > application space, or at least, are accessible to my app for reading &
    > writing. Unfortuantely, the buffer collection is allocated 'at random' from
    > the pool, (I have a queue of pointers to them, with several threads using
    > the queue), and so are not contiguous in memory. This means that they
    > cannot be referenced by a pointer and length, (eg. as a string).
    >
    > It would be really, really nice if I could ask the OS virtual memory manager
    > to make these buffers contiguous in an efficient way. This is the sort of
    > thing the MM does all the time. Since the buffers all belong to my app
    > there is no protection issue - I don't want to access memory belonging to
    > some other process, I just want to move my pool buffers around without
    > copying.

    I doubt you could do this from user-level code in Win32. It would involve
    messing around with the page tables. And of course the process would
    invalidate all pointers to pages you may have stored elsewhere.

    There used to be a tech article "The Virtual-Memory Manager in Windows NT"
     by Randy Kath in the MSDN library. It describes the internals of the OS MM.
    It is a bit dated but i doubt that there have been any significant changes to
    this area in the newer NT versions. There also was a whole book from Microsoft
    Press about this area, as far as I remember.

    --
    Peter Below (TeamB)  
    Use the newsgroup archives :
    http://www.mers.com/searchsite.html
    http://www.tamaracka.com/search.htm
    http://groups.google.com
    http://www.prolix.be
    

  • Next message: Kurt Barthelmess: "Re: Window Messages"

    Relevant Pages

    • Re: section objects and scatter/gather DMA
      ... There are tricks for allocating memory ... can create a small service that allocates the buffers for you and passes ... maintain a certain history depth. ... To get to a dynamic pool management (free up pool ...
      (microsoft.public.development.device.drivers)
    • Moving pages around, (overlapped IO)
      ... Suppose I had a collection of 4k buffers. ... the pool, (I have a queue of pointers to them, with several threads using ... Since the buffers all belong to my app ...
      (borland.public.delphi.nativeapi)
    • Re: New ext4 patchset 2.6.26-rc8-ext4-1
      ... Add basic delayed allocation support ... For one thing the code added to mpage.c doesn't belong ... Also the code still deals with the!buffer_mapped and no buffers on page ...
      (Linux-Kernel)
    • Re: Discovering variable types...
      ... This is because X is actually stored in the executable's memory space but the ... Double buffering (i.e. creating your own internal buffers) makes lots of sense ... not restricted by the limitations of the disk access unit. ... hence: the new file access routines. ...
      (comp.lang.pascal.delphi.misc)
    • Re: [PATCH] Physical Memory Management [0/1]
      ... It aggregates physical memory allocating and management API in one ... PMM has it's own allocator which runs in Obound time where n ... Via a misc char device, the module allows allocation of continuous ... devices would have to develop a method of sharing buffers. ...
      (Linux-Kernel)