라벨이 DosAliasMem인 게시물 표시

OS/2 codes: DosAliasMem(), mapping an address to another address

Many modern OSes support memory mapping. For example, mmap() family of POSIX. However OS/2 has no such APIs supporting it fully. Instead, OS/2 provides an API supporting it partially, which maps an address to another address. It's DosAliasMem() . DosAliasMem() has not been known until Toolkit 4.5. You can see the explanation about DosAliasMem()  in <OS/2 Programming Guide and Reference Addendum> Toolkit 4.5, or http://cyberkinetica.homeunix.net/os2tk45/addendum/022_L2_DosAliasMem.html . Here is a brief explanation. #define INCL_DOSMEMMGR #include <os2.h> APIRET APIENTRY DosAliasMem (PVOID pMem , ULONG cbSize , PPVOID ppAlias , ULONG flags )   Parameters pMem    input           Contains the address of the memory to be aliased. It must be on a page boundary (that is, 4K aligned), but may specify an address within a memory object. cbSize    input       ...