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
06b582e6
Commit
06b582e6
authored
May 05, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use HEAP_ADD_USER_INFO for HLOCAL allocations.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
31df70a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
memory.c
dlls/kernelbase/memory.c
+8
-3
No files found.
dlls/kernelbase/memory.c
View file @
06b582e6
...
...
@@ -713,6 +713,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH HeapWalk( HANDLE heap, PROCESS_HEAP_ENTRY *entry )
* Global/local heap functions
***********************************************************************/
/* some undocumented flags (names are made up) */
#define HEAP_ADD_USER_INFO 0x00000100
/* not compatible with windows */
struct
kernelbase_global_data
{
...
...
@@ -826,15 +829,15 @@ HGLOBAL WINAPI DECLSPEC_HOTPATCH GlobalFree( HLOCAL handle )
*/
HLOCAL
WINAPI
DECLSPEC_HOTPATCH
LocalAlloc
(
UINT
flags
,
SIZE_T
size
)
{
DWORD
heap_flags
=
HEAP_ADD_USER_INFO
;
HANDLE
heap
=
GetProcessHeap
();
struct
mem_entry
*
mem
;
DWORD
heap_flags
=
0
;
HLOCAL
handle
;
void
*
ptr
;
TRACE_
(
globalmem
)(
"flags %#x, size %#Ix
\n
"
,
flags
,
size
);
if
(
flags
&
LMEM_ZEROINIT
)
heap_flags
=
HEAP_ZERO_MEMORY
;
if
(
flags
&
LMEM_ZEROINIT
)
heap_flags
|
=
HEAP_ZERO_MEMORY
;
if
(
!
(
flags
&
LMEM_MOVEABLE
))
/* pointer */
{
...
...
@@ -964,13 +967,15 @@ LPVOID WINAPI DECLSPEC_HOTPATCH LocalLock( HLOCAL handle )
*/
HLOCAL
WINAPI
DECLSPEC_HOTPATCH
LocalReAlloc
(
HLOCAL
handle
,
SIZE_T
size
,
UINT
flags
)
{
DWORD
heap_flags
=
HEAP_ADD_USER_INFO
;
struct
mem_entry
*
mem
;
HLOCAL
ret
=
0
;
DWORD
heap_flags
=
(
flags
&
LMEM_ZEROINIT
)
?
HEAP_ZERO_MEMORY
:
0
;
void
*
ptr
;
TRACE_
(
globalmem
)(
"handle %p, size %#Ix, flags %#x
\n
"
,
handle
,
size
,
flags
);
if
(
flags
&
LMEM_ZEROINIT
)
heap_flags
|=
HEAP_ZERO_MEMORY
;
RtlLockHeap
(
GetProcessHeap
()
);
if
(
flags
&
LMEM_MODIFY
)
/* modify flags */
{
...
...
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