OSDN Git Service

wwww
[proj16/16.git] / src / lib / xms.h
1 #ifndef _XMS_H_
2 #define _XMS_H_
3 #include <stddef.h> /* Definition of NULL */
4 #include <limits.h> /* Definition of UINT_MAX */
5 #include <stdio.h>  /* fprintf and (FILE *) */
6
7 /* Allow external configuration of maximum concurrent XMS allocations */
8 #ifndef MAX_XMS_ALLOCATIONS
9 #define MAX_XMS_ALLOCATIONS 4
10 #endif
11
12 /* Address of the XMS driver */
13 static long XMSControl;
14
15 /* Mapping of XMS handle <-> normal pointer */
16 typedef struct {
17         unsigned int XMSHandle;
18         void huge * XMSPointer;
19 } XMSHandleMap;
20
21 static XMSHandleMap allocMapXMS[MAX_XMS_ALLOCATIONS];
22
23 static int initxms(void);
24 void huge * xmsmalloc(long unsigned int size);
25 void xmsfree(void huge * XMSPointer);
26 void xmsreport(void/*FILE * stream*/);
27
28 #endif/*_XMS_H_*/