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
7e9cba13
Commit
7e9cba13
authored
Jan 29, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use _callnewh in operator new implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
70ac780e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
21 deletions
+13
-21
heap.c
dlls/msvcrt/heap.c
+13
-21
No files found.
dlls/msvcrt/heap.c
View file @
7e9cba13
...
...
@@ -126,13 +126,23 @@ static MSVCRT_size_t msvcrt_heap_size(void *ptr)
}
/*********************************************************************
* _callnewh (MSVCRT.@)
*/
int
CDECL
_callnewh
(
MSVCRT_size_t
size
)
{
int
ret
=
0
;
MSVCRT_new_handler_func
handler
=
MSVCRT_new_handler
;
if
(
handler
)
ret
=
(
*
handler
)(
size
)
?
1
:
0
;
return
ret
;
}
/*********************************************************************
* ??2@YAPAXI@Z (MSVCRT.@)
*/
void
*
CDECL
DECLSPEC_HOTPATCH
MSVCRT_operator_new
(
MSVCRT_size_t
size
)
{
void
*
retval
;
int
freed
;
MSVCRT_new_handler_func
handler
;
do
{
...
...
@@ -142,13 +152,7 @@ void* CDECL DECLSPEC_HOTPATCH MSVCRT_operator_new(MSVCRT_size_t size)
TRACE
(
"(%ld) returning %p
\n
"
,
size
,
retval
);
return
retval
;
}
handler
=
MSVCRT_new_handler
;
if
(
handler
)
freed
=
(
*
handler
)(
size
);
else
freed
=
0
;
}
while
(
freed
);
}
while
(
_callnewh
(
size
));
TRACE
(
"(%ld) out of memory
\n
"
,
size
);
#if _MSVCR_VER >= 80
...
...
@@ -231,18 +235,6 @@ int CDECL MSVCRT__set_new_mode(int mode)
}
/*********************************************************************
* _callnewh (MSVCRT.@)
*/
int
CDECL
_callnewh
(
MSVCRT_size_t
size
)
{
int
ret
=
0
;
MSVCRT_new_handler_func
handler
=
MSVCRT_new_handler
;
if
(
handler
)
ret
=
(
*
handler
)(
size
)
?
1
:
0
;
return
ret
;
}
/*********************************************************************
* _expand (MSVCRT.@)
*/
void
*
CDECL
_expand
(
void
*
mem
,
MSVCRT_size_t
size
)
...
...
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