13adf3aea75376aec61eb41feba88f9421bb7c6b
[reactos.git] / reactos / subsystems / mvdm / ntvdm / dos / dos32krnl / memory.h
1 /*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: dos/dos32krnl/memory.h
5 * PURPOSE: DOS32 Memory Manager
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9 #ifndef _MEMORY_H_
10 #define _MEMORY_H_
11
12 /* TYPEDEFS *******************************************************************/
13
14 enum DOS_ALLOC_STRATEGY
15 {
16 DOS_ALLOC_FIRST_FIT,
17 DOS_ALLOC_BEST_FIT,
18 DOS_ALLOC_LAST_FIT
19 };
20
21 #pragma pack(push, 1)
22 typedef struct _DOS_MCB
23 {
24 CHAR BlockType;
25 WORD OwnerPsp;
26 WORD Size;
27 BYTE Unused[3];
28 CHAR Name[8];
29 } DOS_MCB, *PDOS_MCB;
30 #pragma pack(pop)
31
32 /* VARIABLES ******************************************************************/
33
34 extern BYTE DosAllocStrategy;
35 extern BOOLEAN DosUmbLinked;
36
37 /* FUNCTIONS ******************************************************************/
38
39 WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable);
40 BOOLEAN DosResizeMemory(WORD BlockData, WORD NewSize, WORD *MaxAvailable);
41 BOOLEAN DosFreeMemory(WORD BlockData);
42 BOOLEAN DosLinkUmb(VOID);
43 BOOLEAN DosUnlinkUmb(VOID);
44 VOID DosChangeMemoryOwner(WORD Segment, WORD NewOwner);
45
46 #endif // _MEMORY_H_
47
48 /* EOF */