ReactOS  0.4.14-dev-358-gbef841c
memory.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: GPL - See COPYING in the top level directory
3  * PROJECT: ReactOS Virtual DOS Machine
4  * FILE: subsystems/mvdm/ntvdm/dos/dos32krnl/memory.h
5  * PURPOSE: DOS32 Memory Manager
6  * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7  * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8  */
9 
10 #ifndef _DOS_MEMORY_H_
11 #define _DOS_MEMORY_H_
12 
13 /* TYPEDEFS *******************************************************************/
14 
15 #define SEGMENT_TO_MCB(seg) ((PDOS_MCB)SEG_OFF_TO_PTR((seg), 0))
16 
17 #define DOS_ALLOC_HIGH 0x40
18 #define DOS_ALLOC_HIGH_LOW 0x80
19 
21 {
25 };
26 
27 #pragma pack(push, 1)
28 typedef struct _DOS_MCB
29 {
34  CHAR Name[8];
35 } DOS_MCB, *PDOS_MCB;
36 C_ASSERT(sizeof(DOS_MCB) == 0x10);
37 #pragma pack(pop)
38 
39 /* VARIABLES ******************************************************************/
40 
41 /* FUNCTIONS ******************************************************************/
42 
43 WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable);
44 BOOLEAN DosResizeMemory(WORD BlockData, WORD NewSize, WORD *MaxAvailable);
45 BOOLEAN DosFreeMemory(WORD BlockData);
49 
52 
53 #endif /* _DOS_MEMORY_H_ */
BYTE Unused[3]
Definition: memory.h:33
DOS_ALLOC_STRATEGY
Definition: memory.h:20
BOOLEAN DosResizeMemory(WORD BlockData, WORD NewSize, WORD *MaxAvailable)
Definition: memory.c:289
char CHAR
Definition: xmlstorage.h:175
VOID DosInitializeMemory(VOID)
Definition: memory.c:665
BOOLEAN DosFreeMemory(WORD BlockData)
Definition: memory.c:418
WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable)
Definition: memory.c:136
struct _DOS_MCB DOS_MCB
C_ASSERT(sizeof(DOS_MCB)==0x10)
unsigned char BOOLEAN
_Inout_ PVOID Segment
Definition: exfuncs.h:893
VOID DosChangeMemoryOwner(WORD Segment, WORD NewOwner)
Definition: memory.c:532
unsigned short WORD
Definition: ntddk_ex.h:93
struct _DOS_MCB * PDOS_MCB
WORD OwnerPsp
Definition: memory.h:31
BOOLEAN DosLinkUmb(VOID)
Definition: memory.c:446
unsigned char BYTE
Definition: mem.h:68
_Must_inspect_result_ _In_ USHORT NewSize
Definition: fltkernel.h:975
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
CHAR BlockType
Definition: memory.h:30
VOID DosInitializeUmb(VOID)
Definition: memory.c:582
WORD Size
Definition: memory.h:32
BOOLEAN DosUnlinkUmb(VOID)
Definition: memory.c:492