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
9ffd7938
Commit
9ffd7938
authored
Feb 28, 1999
by
Ove Kaaven
Committed by
Alexandre Julliard
Feb 28, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a couple of dosmem block resize bugs.
parent
718bba93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
dosmem.c
msdos/dosmem.c
+23
-0
No files found.
msdos/dosmem.c
View file @
9ffd7938
...
...
@@ -576,12 +576,35 @@ LPVOID DOSMEM_ResizeBlock(HMODULE16 hModule, void* ptr, UINT size, UINT16* pseg)
info_block
->
free
+=
orgsize
-
dm
->
size
;
}
else
{
/* the collapse didn't help, try getting a new block */
block
=
DOSMEM_GetBlock
(
hModule
,
size
,
pseg
);
if
(
block
)
{
/* we got one, copy the old data there (we do need to, right?) */
memcpy
(
block
,
((
char
*
)
dm
)
+
sizeof
(
dosmem_entry
),
(
size
<
orgsize
)
?
size
:
orgsize
);
/* free old block */
info_block
->
blocks
--
;
info_block
->
free
+=
dm
->
size
;
dm
->
size
|=
DM_BLOCK_FREE
;
}
else
{
/* and Bill Gates said 640K should be enough for everyone... */
/* need to split original and collapsed blocks apart again,
* and free the collapsed blocks again, before exiting */
if
(
blocksize
-
orgsize
>
0x20
)
{
/* split dm so that the next one stays
* paragraph-aligned (and next gains free bit) */
dm
->
size
=
(((
orgsize
+
0xf
+
sizeof
(
dosmem_entry
))
&
~
0xf
)
-
sizeof
(
dosmem_entry
));
next
=
(
dosmem_entry
*
)(((
char
*
)
dm
)
+
sizeof
(
dosmem_entry
)
+
dm
->
size
);
next
->
size
=
(
blocksize
-
(
dm
->
size
+
sizeof
(
dosmem_entry
)))
|
DM_BLOCK_FREE
;
}
else
dm
->
size
&=
DM_BLOCK_MASK
;
}
}
}
...
...
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