ReactOS 0.4.15-dev-7924-g5949c20
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)
28typedef struct _DOS_MCB
29{
36C_ASSERT(sizeof(DOS_MCB) == 0x10);
37#pragma pack(pop)
38
39/* VARIABLES ******************************************************************/
40
41/* FUNCTIONS ******************************************************************/
42
43WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable);
44BOOLEAN DosResizeMemory(WORD BlockData, WORD NewSize, WORD *MaxAvailable);
45BOOLEAN DosFreeMemory(WORD BlockData);
49
52
53#endif /* _DOS_MEMORY_H_ */
unsigned char BOOLEAN
unsigned short WORD
Definition: ntddk_ex.h:93
_Must_inspect_result_ _In_ USHORT NewSize
Definition: fltkernel.h:975
#define C_ASSERT(e)
Definition: intsafe.h:73
CHAR BlockType
Definition: memory.h:30
WORD Size
Definition: memory.h:32
BYTE Unused[3]
Definition: memory.h:33
WORD OwnerPsp
Definition: memory.h:31
BOOLEAN DosResizeMemory(WORD BlockData, WORD NewSize, WORD *MaxAvailable)
Definition: memory.c:289
WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable)
Definition: memory.c:136
VOID DosInitializeUmb(VOID)
Definition: memory.c:582
BOOLEAN DosUnlinkUmb(VOID)
Definition: memory.c:492
VOID DosInitializeMemory(VOID)
Definition: memory.c:665
VOID DosChangeMemoryOwner(WORD Segment, WORD NewOwner)
Definition: memory.c:532
BOOLEAN DosLinkUmb(VOID)
Definition: memory.c:446
struct _DOS_MCB * PDOS_MCB
struct _DOS_MCB DOS_MCB
BOOLEAN DosFreeMemory(WORD BlockData)
Definition: memory.c:418
DOS_ALLOC_STRATEGY
Definition: memory.h:21
@ DOS_ALLOC_LAST_FIT
Definition: memory.h:24
@ DOS_ALLOC_BEST_FIT
Definition: memory.h:23
@ DOS_ALLOC_FIRST_FIT
Definition: memory.h:22
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Inout_ PVOID Segment
Definition: exfuncs.h:1101
char CHAR
Definition: xmlstorage.h:175
unsigned char BYTE
Definition: xxhash.c:193