Alex Henrie : msvcrt: Add DECLSPEC_HOTPATCH to functions patched by libtcmalloc.

Alexandre Julliard julliard at winehq.org
Thu Nov 29 15:09:39 CST 2018


Module: wine
Branch: stable
Commit: 9d787e8203fd01edd9eeddcb709072c8ba4b07de
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9d787e8203fd01edd9eeddcb709072c8ba4b07de

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Tue Sep 18 00:58:21 2018 -0600

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 at gmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit b917cc66f4f7b786e7f19f63ab0c0819a5455222)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/msvcrt/heap.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c
index 7ea80a3..b4f11d8 100644
--- a/dlls/msvcrt/heap.c
+++ b/dlls/msvcrt/heap.c
@@ -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 at 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 at 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);




More information about the wine-cvs mailing list