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
8e3201c5
Commit
8e3201c5
authored
Jul 03, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Jul 03, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: LocalInit with start == 0 always places heap at end of segment.
parent
3c717e43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
local.c
memory/local.c
+25
-14
No files found.
memory/local.c
View file @
8e3201c5
...
...
@@ -349,22 +349,33 @@ BOOL16 WINAPI LocalInit16( HANDLE16 selector, WORD start, WORD end )
}
}
if
(
start
==
0
)
{
/* Check if the segment is the DGROUP of a module */
if
(
start
==
0
)
{
/* start == 0 means: put the local heap at the end of the segment */
DWORD
size
=
GlobalSize16
(
GlobalHandle16
(
selector
)
);
start
=
(
WORD
)(
size
>
0xffff
?
0xffff
:
size
)
-
1
;
start
-=
end
;
end
+=
start
;
if
((
pModule
=
NE_GetPtr
(
selector
)))
/* Paranoid check */
if
((
pModule
=
NE_GetPtr
(
GlobalHandle16
(
selector
)
)))
{
SEGTABLEENTRY
*
pSeg
=
NE_SEG_TABLE
(
pModule
)
+
pModule
->
dgroup
-
1
;
if
(
pModule
->
dgroup
&&
(
GlobalHandleToSel16
(
pSeg
->
hSeg
)
==
selector
))
{
/* We can't just use the simple method of using the value
* of minsize + stacksize, since there are programs that
* resize the data segment before calling InitTask(). So,
* we must put it at the end of the segment */
start
=
GlobalSize16
(
GlobalHandle16
(
selector
)
);
start
-=
end
;
end
+=
start
;
TRACE_
(
local
)(
" new start %04x, minstart: %04x
\n
"
,
start
,
pSeg
->
minsize
+
pModule
->
stack_size
);
SEGTABLEENTRY
*
pSeg
=
NE_SEG_TABLE
(
pModule
);
int
segNr
;
for
(
segNr
=
0
;
segNr
<
pModule
->
seg_count
;
segNr
++
,
pSeg
++
)
if
(
GlobalHandleToSel16
(
pSeg
->
hSeg
)
==
selector
)
break
;
if
(
segNr
<
pModule
->
seg_count
)
{
WORD
minsize
=
pSeg
->
minsize
;
if
(
pModule
->
ss
==
segNr
+
1
)
minsize
+=
pModule
->
stack_size
;
TRACE_
(
local
)(
" new start %04x, minstart: %04x
\n
"
,
start
,
minsize
);
}
}
}
...
...
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