ntdll: Disable debug flags when running on Valgrind.

The extra debug checks cause more harm than good under Valgrind.
This commit is contained in:
Alexandre Julliard 2010-01-28 19:42:31 +01:00
parent 2a07163901
commit a75ae7936e

View File

@ -1406,6 +1406,8 @@ void heap_set_debug_flags( HANDLE handle )
flags |= HEAP_VALIDATE | HEAP_VALIDATE_ALL |
HEAP_TAIL_CHECKING_ENABLED | HEAP_FREE_CHECKING_ENABLED;
if (RUNNING_ON_VALGRIND) flags = 0; /* no sense in validating since Valgrind catches accesses */
heap->flags |= flags;
heap->force_flags |= flags & ~(HEAP_VALIDATE | HEAP_DISABLE_COALESCE_ON_FREE);