Eliminate memory leak reported in add_current_malloc_heap at exit (Win32)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 24 Jan 2020 09:01:38 +0000 (12:01 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 24 Jan 2020 09:28:52 +0000 (12:28 +0300)
commit5551f9ac979b7b7b877d97c05bdcfe40843de06a
tree80e54cad38982db855756e97e9e6f452a98107ad
parentc404cb29d9835f46c6d33948a1464cd741516be0
Eliminate memory leak reported in add_current_malloc_heap at exit (Win32)

Issue #302 (bdwgc).

Explicitly free GC_malloc_heap_l linked list nodes right before program
exit to avoid complains of a memory leak.

* os_dep.c [(MSWIN32 || MSWINCE || CYGWIN32) && USE_WINALLOC
&& !REDIRECT_MALLOC] (GC_free_malloc_heap_list): New function.
* os_dep.c [(MSWIN32 || MSWINCE || CYGWIN32) && USE_WINALLOC
&& !REDIRECT_MALLOC && !MSWIN_XBOX1] (GC_win32_free_heap): Call
GC_free_malloc_heap_list.
os_dep.c