msvcrt: Add DECLSPEC_HOTPATCH to functions patched by libtcmalloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199 Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bdd3f7b1ee
commit
b917cc66f4
|
@ -21,6 +21,7 @@
|
|||
* handler and non atomic heap operations
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "msvcrt.h"
|
||||
#include "mtdll.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -127,7 +128,7 @@ static MSVCRT_size_t msvcrt_heap_size(void *ptr)
|
|||
/*********************************************************************
|
||||
* ??2@YAPAXI@Z (MSVCRT.@)
|
||||
*/
|
||||
void* CDECL MSVCRT_operator_new(MSVCRT_size_t size)
|
||||
void* CDECL DECLSPEC_HOTPATCH MSVCRT_operator_new(MSVCRT_size_t size)
|
||||
{
|
||||
void *retval;
|
||||
int freed;
|
||||
|
@ -169,7 +170,7 @@ void* CDECL MSVCRT_operator_new_dbg(MSVCRT_size_t size, int type, const char *fi
|
|||
/*********************************************************************
|
||||
* ??3@YAXPAX@Z (MSVCRT.@)
|
||||
*/
|
||||
void CDECL MSVCRT_operator_delete(void *mem)
|
||||
void CDECL DECLSPEC_HOTPATCH MSVCRT_operator_delete(void *mem)
|
||||
{
|
||||
TRACE("(%p)\n", mem);
|
||||
msvcrt_heap_free(mem);
|
||||
|
@ -394,7 +395,7 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs
|
|||
/*********************************************************************
|
||||
* calloc (MSVCRT.@)
|
||||
*/
|
||||
void* CDECL MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size)
|
||||
void* CDECL DECLSPEC_HOTPATCH MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size)
|
||||
{
|
||||
MSVCRT_size_t bytes = count*size;
|
||||
|
||||
|
@ -420,7 +421,7 @@ void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* free (MSVCRT.@)
|
||||
*/
|
||||
void CDECL MSVCRT_free(void* ptr)
|
||||
void CDECL DECLSPEC_HOTPATCH MSVCRT_free(void* ptr)
|
||||
{
|
||||
msvcrt_heap_free(ptr);
|
||||
}
|
||||
|
@ -459,7 +460,7 @@ void* CDECL _malloc_base(MSVCRT_size_t size)
|
|||
/*********************************************************************
|
||||
* realloc (MSVCRT.@)
|
||||
*/
|
||||
void* CDECL MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
|
||||
void* CDECL DECLSPEC_HOTPATCH MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
|
||||
{
|
||||
if (!ptr) return MSVCRT_malloc(size);
|
||||
if (size) return msvcrt_heap_realloc(0, ptr, size);
|
||||
|
|
Loading…
Reference in New Issue