Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
43a35958
Commit
43a35958
authored
Aug 15, 2009
by
Jesse Litton
Committed by
Alexandre Julliard
Aug 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Don't double memory allocation on every add.
parent
d9784c1a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
minidump.c
dlls/dbghelp/minidump.c
+7
-7
No files found.
dlls/dbghelp/minidump.c
View file @
43a35958
...
...
@@ -260,7 +260,7 @@ static BOOL add_module(struct dump_context* dc, const WCHAR* name,
dc
->
modules
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dc
->
alloc_modules
*
sizeof
(
*
dc
->
modules
));
}
else
else
if
(
dc
->
num_modules
>=
dc
->
alloc_modules
)
{
dc
->
alloc_modules
*=
2
;
dc
->
modules
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
dc
->
modules
,
...
...
@@ -394,17 +394,17 @@ static void fetch_module_versioninfo(LPCWSTR filename, VS_FIXEDFILEINFO* ffi)
*/
static
void
add_memory_block
(
struct
dump_context
*
dc
,
ULONG64
base
,
ULONG
size
,
ULONG
rva
)
{
if
(
dc
->
mem
)
if
(
!
dc
->
mem
)
{
dc
->
alloc_mem
=
32
;
dc
->
mem
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dc
->
alloc_mem
*
sizeof
(
*
dc
->
mem
));
}
else
if
(
dc
->
num_mem
>=
dc
->
alloc_mem
)
{
dc
->
alloc_mem
*=
2
;
dc
->
mem
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
dc
->
mem
,
dc
->
alloc_mem
*
sizeof
(
*
dc
->
mem
));
}
else
{
dc
->
alloc_mem
=
32
;
dc
->
mem
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dc
->
alloc_mem
*
sizeof
(
*
dc
->
mem
));
}
if
(
dc
->
mem
)
{
dc
->
mem
[
dc
->
num_mem
].
base
=
base
;
...
...
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