source: trunk/src/kernel32/oslibmem.h@ 10010

Last change on this file since 10010 was 9617, checked in by sandervl, 23 years ago

added dll load hook and function to override named or ordinal exports

File size: 2.4 KB
Line 
1/* $Id: oslibmem.h,v 1.3 2003-01-05 12:31:24 sandervl Exp $ */
2/*
3 * OS/2 Memory management procedures
4 *
5 * Copyright 2002 Sander van Leeuwen (sandervl@xs4all.nl)
6 *
7 */
8#ifndef __OSLIBMEM_H__
9#define __OSLIBMISC_H__
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#ifndef __OS2_H__
16
17/* Access protection */
18#define PAG_READ 0x00000001U /* read access */
19#define PAG_WRITE 0x00000002U /* write access */
20#define PAG_EXECUTE 0x00000004U /* execute access */
21#define PAG_GUARD 0x00000008U /* guard protection */
22#define PAG_DEFAULT 0x00000400U /* default (initial) access */
23
24/* Commit */
25#define PAG_COMMIT 0x00000010U /* commit storage */
26#define PAG_DECOMMIT 0x00000020U /* decommit storage */
27
28/* Allocation attributes */
29#define OBJ_TILE 0x00000040U /* tile object */
30#define OBJ_PROTECTED 0x00000080U /* protect object */
31#define OBJ_GETTABLE 0x00000100U /* gettable by other processes */
32#define OBJ_GIVEABLE 0x00000200U /* giveable to other processes */
33
34/* Allocation type (returned from DosQueryMem) */
35#define PAG_SHARED 0x00002000U /* shared object */
36#define PAG_FREE 0x00004000U /* pages are free */
37#define PAG_BASE 0x00010000U /* first page in object */
38
39#endif
40
41#ifndef PAGE_SIZE
42#define PAGE_SIZE 4096
43#endif
44
45#define MEM_TILED_CEILING 0x1fffffff
46
47DWORD OSLibDosAliasMem(LPVOID pb, ULONG cb, LPVOID *ppbAlias, ULONG fl);
48DWORD OSLibDosAllocMem(LPVOID *lplpMemAddr, DWORD size, DWORD flags, BOOL fLowMemory = FALSE);
49DWORD OSLibDosFreeMem(LPVOID lpMemAddr);
50DWORD OSLibDosQueryMem(LPVOID lpMemAddr, DWORD *lpRangeSize, DWORD *lpAttr);
51DWORD OSLibDosSetMem(LPVOID lpMemAddr, DWORD size, DWORD flags);
52DWORD OSLibDosAllocSharedMem(LPVOID *lplpMemAddr, DWORD size, DWORD flags, LPSTR name);
53DWORD OSLibDosGetNamedSharedMem(LPVOID *lplpMemAddr, LPSTR name);
54PVOID OSLibDosFindMemBase(LPVOID lpMemAddr);
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif
Note: See TracBrowser for help on using the repository browser.