Re: Moving pages around, (overlapped IO)
From: Peter Below (TeamB) (100113.1101_at_compuXXserve.com)
Date: 11/08/03
- Previous message: Camiel Wijffels: "Window Messages"
- In reply to: Martin James: "Moving pages around, (overlapped IO)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Camiel Wijffels: "Window Messages"
- In reply to: Martin James: "Moving pages around, (overlapped IO)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|