Message-ID: <363D8E66.CD0DDE3D@gmx.de> Date: Mon, 02 Nov 1998 11:50:14 +0100 From: Christian Hofrichter X-Mailer: Mozilla 4.05 [de]C-QXW0310a (Win95; I) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Neeed some help about protected-mode-memory-management Content-Type: multipart/alternative; boundary="------------FC45C735E917CFD8ADAB54AF" Reply-To: djgpp AT delorie DOT com --------------FC45C735E917CFD8ADAB54AF Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 1st. How can I get the offset of a variable or a function ? offset=&variable; offset=function or offset=&function Is this right ? 2nd. How can I get the size of a function ? (with sizeof ????) 3rd. Why do I have to lock the memory when I want to access a linear address ? I mean when this space is swaped to disk and I want to access it with a selector and an offset, doesn't the dpmi-server reload it from disk automaticly ? 4th. When I want to copy memory-blocks in the space above 1 MB (in assembler), is this the same procedure like in real-mode with the difference that I have to store the selectors in the registers where I had to store the segments in the real-mode before ? 5th. Can I have direct access to memory in the space above1 MB without using the FAT DS method ? 6th. Can I have direct access to memory in the space under 1 MB without using the FAT DS method ? 7th. When I map linear memory, what does it mean ? Does it mean that I can access this memory-space without a selector because this space is now in the available address space of my program ? That would mean that the offset of the varaibles and functions to the memory-space descripted by the discriptor is changed !!!! Or does it mean that I only get a selector to access it ? 8th. How can I get the physical address when I have a selector and an offset (this memory-space is not swaped to disk) ? 9th. Do the memory-copy-routines - for the protected-mode in Djgpp- move 4 bytes at one time ? --------------FC45C735E917CFD8ADAB54AF Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 1st.
How can I get the offset of a variable or a function ?

            offset=&variable; 
            offset=function  or  offset=&function

Is this right ?
2nd.
How can I get the size of a function ?
(with sizeof ????)
3rd.
Why do I have to lock the memory when I want to access a linear address ? I mean when this space is swaped to disk and I want to access it with a selector and an offset, doesn't the dpmi-server reload it from disk automaticly ?
4th.
When I want to copy memory-blocks in the space above 1 MB (in assembler), is this the same procedure like in real-mode with the difference that I have to store the selectors in the registers where I had to store the segments in the real-mode before ?
5th.
Can I have direct access to memory in the space above1 MB  without using the FAT DS method ?
6th.
Can I have direct access to memory in the space under 1 MB  without using the FAT DS method ?
7th.
When I map linear memory, what does it mean ? Does it mean that I can access this memory-space without a selector because this space is now in the available address space of my program ? That would mean that the offset of the varaibles and functions to the memory-space  descripted by the discriptor is changed !!!!
Or does it mean that I only get a selector to access it ?
8th.
How can I get the physical address when I have a selector and an offset (this memory-space is not swaped to disk) ?
9th.
Do the memory-copy-routines - for the protected-mode in Djgpp- move 4 bytes at one time ?
  --------------FC45C735E917CFD8ADAB54AF--