Commit 69d7cb56 authored by Alexandre Julliard's avatar Alexandre Julliard

Avoid calling some kernel functions.

parent c513a30e
...@@ -117,7 +117,7 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit ) ...@@ -117,7 +117,7 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
if ( res == WAIT_TIMEOUT ) if ( res == WAIT_TIMEOUT )
{ {
const char *name = (char *)crit->DebugInfo; const char *name = (char *)crit->DebugInfo;
if (!name || IsBadStringPtrA(name,80)) name = "?"; if (!name) name = "?";
ERR( "section %p %s wait timed out, retrying (60 sec) tid=%08lx\n", ERR( "section %p %s wait timed out, retrying (60 sec) tid=%08lx\n",
crit, debugstr_a(name), GetCurrentThreadId() ); crit, debugstr_a(name), GetCurrentThreadId() );
res = WaitForSingleObject( sem, 60000L ); res = WaitForSingleObject( sem, 60000L );
......
...@@ -426,6 +426,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena ) ...@@ -426,6 +426,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
if (((char *)pFree == (char *)subheap + subheap->headerSize) && if (((char *)pFree == (char *)subheap + subheap->headerSize) &&
(subheap != &subheap->heap->subheap)) (subheap != &subheap->heap->subheap))
{ {
ULONG size = 0;
SUBHEAP *pPrev = &subheap->heap->subheap; SUBHEAP *pPrev = &subheap->heap->subheap;
/* Remove the free block from the list */ /* Remove the free block from the list */
pFree->next->prev = pFree->prev; pFree->next->prev = pFree->prev;
...@@ -435,7 +436,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena ) ...@@ -435,7 +436,7 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
if (pPrev) pPrev->next = subheap->next; if (pPrev) pPrev->next = subheap->next;
/* Free the memory */ /* Free the memory */
subheap->magic = 0; subheap->magic = 0;
VirtualFree( subheap, 0, MEM_RELEASE ); NtFreeVirtualMemory( GetCurrentProcess(), (void **)&subheap, &size, MEM_RELEASE );
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment