views:

42

answers:

0

Hi,

I am new to windows. My web application is leaking huge amounts of memory. I am using apache 2.2.15 and PHP 5.2.13

I used "Windows Debugging Tools -umdh" to detect leaks.

And the output of the trace is as below(difference before stress and after stress) :


  • 217800195 ( 222666334 - 4866139) 3266192 allocs BackTraceC6
  • 3240839 ( 3266192 - 25353) BackTraceC6 allocations

    ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F MSVCR80!malloc+0000007A (f:\dd\vctools\crt_bld\self_x86\crt\src\malloc.c, 163)


  • 180617216 ( 181141504 - 524288) 691 allocs BackTrace67D
  • 689 ( 691 - 2) BackTrace67D allocations

    ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F php5ts!zend_register_internal_class_ex+000001A5


  • 6093760 ( 6129984 - 36224) 2870 allocs BackTrace68C
  • 2780 ( 2870 - 90) BackTrace68C allocations

    ntdll!RtlReAllocateHeap+000001F1 MSVCR80!realloc+0000035F (f:\dd\vctools\crt_bld\self_x86\crt\src\realloc.c, 323) php5ts!zend_hash_next_free_element+00000035


  • 852768 ( 873504 - 20736) 5606 allocs BackTrace3FC
  • 5104 ( 5606 - 502) BackTrace3FC allocations

    ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F MSVCR80!_calloc_impl+00000125 (f:\dd\vctools\crt_bld\self_x86\crt\src\calloc.c, 94) MSVCR80!calloc+00000018 (f:\dd\vctools\crt_bld\self_x86\crt\src\calloc.c, 147) php5ts!zend_hash_init+0000007C


  • 401520 ( 404208 - 2688) 2888 allocs BackTrace68D
  • 2868 ( 2888 - 20) BackTrace68D allocations

    ntdll!RtlReAllocateHeap+000001F1 MSVCR80!realloc+0000035F (f:\dd\vctools\crt_bld\self_x86\crt\src\realloc.c, 323) php5ts!zend_hash_add_or_update+00000300


  • 294680 ( 295528 - 848) 697 allocs BackTrace697
  • 695 ( 697 - 2) BackTrace697 allocations

    ntdll!RtlAllocateHeapSlowly+00000041 ntdll!RtlAllocateHeap+00000E9F MSVCR80!_calloc_impl+00000125 (f:\dd\vctools\crt_bld\self_x86\crt\src\calloc.c, 94) MSVCR80!calloc+00000018 (f:\dd\vctools\crt_bld\self_x86\crt\src\calloc.c, 147) php5ts!zend_print_flat_zval_r+00000376


etc ... The above being most than others.

I need help in understanding the above log. Can I infer from above that PHP is the culprit ?