Alexandre Julliard : kernel32: Improve tracing in GlobalAlloc.

Alexandre Julliard julliard at winehq.org
Tue Oct 2 06:52:44 CDT 2007


Module: wine
Branch: master
Commit: 4a5ba4c732394b06b33351685b02c65f1f5b4a64
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4a5ba4c732394b06b33351685b02c65f1f5b4a64

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Oct  2 13:31:59 2007 +0200

kernel32: Improve tracing in GlobalAlloc.

---

 dlls/kernel32/heap.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
index c3598af..587499a 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -356,11 +356,10 @@ HGLOBAL WINAPI GlobalAlloc(
    else
       hpflags=0;
 
-   TRACE("() flags=%04x\n",  flags );
-
    if((flags & GMEM_MOVEABLE)==0) /* POINTER */
    {
       palloc=HeapAlloc(GetProcessHeap(), hpflags, size);
+      TRACE( "(flags=%04x) returning %p\n",  flags, palloc );
       return (HGLOBAL) palloc;
    }
    else  /* HANDLE */
@@ -399,7 +398,10 @@ HGLOBAL WINAPI GlobalAlloc(
       }
 
       RtlUnlockHeap(GetProcessHeap());
-      return pintern ? INTERN_TO_HANDLE(pintern) : 0;
+      if (!pintern) return 0;
+      TRACE( "(flags=%04x) returning handle %p pointer %p\n",
+             flags, INTERN_TO_HANDLE(pintern), pintern->Pointer );
+      return INTERN_TO_HANDLE(pintern);
    }
 }
 




More information about the wine-cvs mailing list