Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
872f9450
Commit
872f9450
authored
Dec 12, 2002
by
Jukka Heinonen
Committed by
Alexandre Julliard
Dec 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give DOS applications 638k of free conventional memory.
parent
5f9e3ffd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
5 deletions
+39
-5
dosmem.c
msdos/dosmem.c
+39
-5
No files found.
msdos/dosmem.c
View file @
872f9450
...
...
@@ -85,6 +85,11 @@ static char *DOSMEM_dosmem;
* and only relocated to NULL when absolutely necessary */
static
char
*
DOSMEM_sysmem
;
/* Start of DOS conventional memory */
static
char
*
DOSMEM_membase
;
static
void
DOSMEM_InitMemory
(
void
);
/***********************************************************************
* DOSMEM_MemoryTop
*
...
...
@@ -102,7 +107,36 @@ static char *DOSMEM_MemoryTop(void)
*/
static
dosmem_info
*
DOSMEM_InfoBlock
(
void
)
{
return
(
dosmem_info
*
)(
DOSMEM_dosmem
+
0x10000
);
/* 64K */
if
(
!
DOSMEM_membase
)
{
DWORD
reserve
;
/*
* Reserve either:
* - lowest 64k for NULL pointer catching (Win16)
* - lowest 1k for interrupt handlers and
* another 0.5k for BIOS, DOS and intra-application
* areas (DOS)
*/
if
(
DOSMEM_dosmem
!=
DOSMEM_sysmem
)
reserve
=
0x10000
;
/* 64k */
else
reserve
=
0x600
;
/* 1.5k */
/*
* Round to paragraph boundary in order to make
* sure the alignment is correct.
*/
reserve
=
((
reserve
+
15
)
>>
4
)
<<
4
;
/*
* Set DOS memory base and initialize conventional memory.
*/
DOSMEM_membase
=
DOSMEM_dosmem
+
reserve
;
DOSMEM_InitMemory
();
}
return
(
dosmem_info
*
)
DOSMEM_membase
;
}
/***********************************************************************
...
...
@@ -311,9 +345,6 @@ static void DOSMEM_FillBiosSegments(void)
*/
static
void
DOSMEM_InitMemory
(
void
)
{
/* Low 64Kb are reserved for DOS/BIOS so the useable area starts at
* 1000:0000 and ends at 9FFF:FFEF. */
dosmem_info
*
info_block
=
DOSMEM_InfoBlock
();
dosmem_entry
*
root_block
=
DOSMEM_RootBlock
();
dosmem_entry
*
dm
;
...
...
@@ -330,8 +361,12 @@ static void DOSMEM_InitMemory(void)
|
DM_BLOCK_DEBUG
#endif
;
TRACE
(
"DOS conventional memory initialized, %d bytes free.
\n
"
,
DOSMEM_Available
()
);
}
/**********************************************************************
* setup_dos_mem
*
...
...
@@ -403,7 +438,6 @@ BOOL DOSMEM_Init(BOOL dos_init)
0x10000
,
0
,
WINE_LDT_FLAGS_DATA
);
DOSMEM_FillBiosSegments
();
DOSMEM_FillIsrTable
();
DOSMEM_InitMemory
();
already_done
=
1
;
}
else
if
(
dos_init
&&
!
already_mapped
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment