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
b6ee614a
Commit
b6ee614a
authored
Oct 24, 2003
by
Oleg Prokhorov
Committed by
Alexandre Julliard
Oct 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another portion of HeapReAlloc fixes.
parent
6661f304
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
8 deletions
+49
-8
parser.c
dlls/setupapi/parser.c
+9
-2
virtcopy.c
dlls/setupapi/virtcopy.c
+11
-2
xrender.c
dlls/x11drv/xrender.c
+29
-4
No files found.
dlls/setupapi/parser.c
View file @
b6ee614a
...
...
@@ -159,10 +159,17 @@ static void *grow_array( void *array, unsigned int *count, size_t elem )
void
*
new_array
;
unsigned
int
new_count
=
*
count
+
*
count
/
2
;
if
(
new_count
<
32
)
new_count
=
32
;
if
((
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
array
,
new_count
*
elem
)))
if
(
array
)
new_array
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
array
,
new_count
*
elem
);
else
new_array
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
new_count
*
elem
);
if
(
new_array
)
*
count
=
new_count
;
else
HeapFree
(
GetProcessHeap
(),
0
,
array
);
if
(
array
)
HeapFree
(
GetProcessHeap
(),
0
,
array
);
return
new_array
;
}
...
...
dlls/setupapi/virtcopy.c
View file @
b6ee614a
...
...
@@ -124,7 +124,12 @@ VHSTR WINAPI vsmStringAdd16(LPCSTR lpszName)
{
index
=
vhstr_alloc
;
vhstr_alloc
+=
20
;
vhstrlist
=
HeapReAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
vhstrlist
,
if
(
vhstrlist
)
vhstrlist
=
HeapReAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
vhstrlist
,
sizeof
(
VHSTR_STRUCT
*
)
*
vhstr_alloc
);
else
vhstrlist
=
HeapAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
sizeof
(
VHSTR_STRUCT
*
)
*
vhstr_alloc
);
}
if
(
index
==
0xffff
)
...
...
@@ -229,7 +234,11 @@ RETERR16 VCP_VirtnodeCreate(LPVCPFILESPEC vfsSrc, LPVCPFILESPEC vfsDst, WORD fl,
if
(
vn_last
==
vn_num
)
{
vn_num
+=
20
;
pvnlist
=
HeapReAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
pvnlist
,
if
(
pvnlist
)
pvnlist
=
HeapReAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
pvnlist
,
sizeof
(
LPVIRTNODE
*
)
*
vn_num
);
else
pvnlist
=
HeapAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
sizeof
(
LPVIRTNODE
*
)
*
vn_num
);
}
pvnlist
[
vn_last
]
=
HeapAlloc
(
heap
,
HEAP_ZERO_MEMORY
,
sizeof
(
VIRTNODE
));
...
...
dlls/x11drv/xrender.c
View file @
b6ee614a
...
...
@@ -334,10 +334,17 @@ static int AllocEntry(void)
}
TRACE
(
"Growing cache
\n
"
);
glyphsetCache
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
if
(
glyphsetCache
)
glyphsetCache
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
glyphsetCache
,
(
glyphsetCacheSize
+
INIT_CACHE_SIZE
)
*
sizeof
(
*
glyphsetCache
));
else
glyphsetCache
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
(
glyphsetCacheSize
+
INIT_CACHE_SIZE
)
*
sizeof
(
*
glyphsetCache
));
for
(
best
=
i
=
glyphsetCacheSize
;
i
<
glyphsetCacheSize
+
INIT_CACHE_SIZE
;
i
++
)
{
glyphsetCache
[
i
].
next
=
i
+
1
;
...
...
@@ -538,19 +545,37 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph)
if
(
entry
->
nrealized
<=
glyph
)
{
entry
->
nrealized
=
(
glyph
/
128
+
1
)
*
128
;
entry
->
realized
=
HeapReAlloc
(
GetProcessHeap
(),
if
(
entry
->
realized
)
entry
->
realized
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
entry
->
realized
,
entry
->
nrealized
*
sizeof
(
BOOL
));
else
entry
->
realized
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
entry
->
nrealized
*
sizeof
(
BOOL
));
if
(
entry
->
glyphset
==
0
)
{
entry
->
bitmaps
=
HeapReAlloc
(
GetProcessHeap
(),
if
(
entry
->
bitmaps
)
entry
->
bitmaps
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
entry
->
bitmaps
,
entry
->
nrealized
*
sizeof
(
entry
->
bitmaps
[
0
]));
entry
->
gis
=
HeapReAlloc
(
GetProcessHeap
(),
else
entry
->
bitmaps
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
entry
->
nrealized
*
sizeof
(
entry
->
bitmaps
[
0
]));
if
(
entry
->
gis
)
entry
->
gis
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
entry
->
gis
,
entry
->
nrealized
*
sizeof
(
entry
->
gis
[
0
]));
else
entry
->
gis
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
entry
->
nrealized
*
sizeof
(
entry
->
gis
[
0
]));
}
}
...
...
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