Thanks @JMGK
I have gone through all the Search · memory leak · GitHub related to the memory leak. All the memory leak related patches present in the libsdl2(SDL2-2.0.4).
I have ran with the valgrind tool as well, getting the below information from the valgrind logs
==23887==
==23887== 100 bytes in 1 blocks are still reachable in loss record 77 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BF2D19: fusion_reactor_new (reactor.c:1641)
==23887== by 0x4B45659: dfb_wm_core_initialize (wm.c:179)
==23887== by 0x4AFFE3F: dfb_core_part_initialize (core_parts.c:79)
==23887== by 0x4AFE157: dfb_core_initialize (core.c:1852)
==23887== by 0x4AABE45: DirectFB::ICore_Real::Initialize() (CoreDFB_real.cpp:80)
==23887== by 0x4AA9C6B: CoreDFB_Initialize (CoreDFB.cpp:70)
==23887== by 0x4AFD189: dfb_core_arena_initialize (core.c:1995)
==23887== by 0x4AFD493: dfb_core_create (core.c:356)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887==
==23887== 100 bytes in 1 blocks are still reachable in loss record 78 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BF2D19: fusion_reactor_new (reactor.c:1641)
==23887== by 0x4BF1A8F: fusion_object_create (object.c:451)
==23887== by 0x4AFF2AB: dfb_core_create_layer_context (core.c:536)
==23887== by 0x4B195FF: dfb_layer_create_context (layer_control.c:190)
==23887== by 0x4B19AB9: dfb_layer_get_primary_context (layer_control.c:311)
==23887== by 0x4ABAC45: DirectFB::ILayer_Real::GetPrimaryContext(DFBBoolean, __DFB_CoreLayerContext**) (CoreLayer_real.cpp:78)
==23887== by 0x4AB9E77: CoreLayer_GetPrimaryContext (CoreLayer.cpp:105)
==23887== by 0x4AA8BE1: InitIDirectFB_Async (idirectfb.c:2022)
==23887== by 0x4AA9043: IDirectFB_Construct (idirectfb.c:2123)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887==
==23887== 100 bytes in 1 blocks are still reachable in loss record 79 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BF2D19: fusion_reactor_new (reactor.c:1641)
==23887== by 0x4BF1A8F: fusion_object_create (object.c:451)
==23887== by 0x4AFF3F7: dfb_core_create_layer_region (core.c:558)
==23887== by 0x4B1A115: dfb_layer_region_create (layer_region.c:169)
==23887== by 0x4B18B53: dfb_layer_context_get_primary_region (layer_context.c:525)
==23887== by 0x7221253: ???
==23887== by 0x4B463B7: dfb_wm_init_stack (wm.c:875)
==23887== by 0x4B42119: dfb_windowstack_create (windowstack.c:246)
==23887== by 0x4B16519: dfb_layer_context_init (layer_context.c:258)
==23887== by 0x4B19623: dfb_layer_create_context (layer_control.c:201)
==23887==
==23887== 100 bytes in 1 blocks are still reachable in loss record 80 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BF2D19: fusion_reactor_new (reactor.c:1641)
==23887== by 0x4BF1A8F: fusion_object_create (object.c:451)
==23887== by 0x4AFF68F: dfb_core_create_surface (core.c:602)
==23887== by 0x4B2C5BF: dfb_surface_create (surface.c:206)
==23887== by 0x4B17D41: dfb_layer_context_allocate_surface (layer_context.c:1868)
==23887== by 0x4B188E5: dfb_layer_context_set_configuration (layer_context.c:774)
==23887== by 0x4B18C31: dfb_layer_context_get_primary_region (layer_context.c:559)
==23887== by 0x7221253: ???
==23887== by 0x4B463B7: dfb_wm_init_stack (wm.c:875)
==23887== by 0x4B42119: dfb_windowstack_create (windowstack.c:246)
==23887==
==23887== 100 bytes in 1 blocks are still reachable in loss record 81 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BF2D19: fusion_reactor_new (reactor.c:1641)
==23887== by 0x4BF1A8F: fusion_object_create (object.c:451)
==23887== by 0x4AFF543: dfb_core_create_palette (core.c:580)
==23887== by 0x4B1F975: dfb_palette_create (palette.c:125)
==23887== by 0x4B2C491: dfb_surface_init_palette (surface.c:452)
==23887== by 0x4B2C9C5: dfb_surface_create (surface.c:323)
==23887== by 0x4B17D41: dfb_layer_context_allocate_surface (layer_context.c:1868)
==23887== by 0x4B188E5: dfb_layer_context_set_configuration (layer_context.c:774)
==23887== by 0x4B18C31: dfb_layer_context_get_primary_region (layer_context.c:559)
==23887== by 0x7221253: ???
==23887==
==23887== 108 bytes in 3 blocks are still reachable in loss record 82 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C19A4D: direct_trace_copy_buffer (trace.c:606)
==23887== by 0x4C10AF1: direct_dbg_calloc (mem.c:206)
==23887== by 0x4C12645: direct_modules_explore_directory (modules.c:235)
==23887== by 0x4B3D641: dfb_system_lookup (system.c:266)
==23887== by 0x4AFD323: dfb_core_create (core.c:289)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887== by 0x489E651: DirectFB_VideoInit (SDL_DirectFB_video.c:249)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 108 bytes in 3 blocks are still reachable in loss record 83 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C19A4D: direct_trace_copy_buffer (trace.c:606)
==23887== by 0x4C10BFD: direct_dbg_strdup (mem.c:326)
==23887== by 0x4C1269B: direct_modules_explore_directory (modules.c:245)
==23887== by 0x4B3D641: dfb_system_lookup (system.c:266)
==23887== by 0x4AFD323: dfb_core_create (core.c:289)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887== by 0x489E651: DirectFB_VideoInit (SDL_DirectFB_video.c:249)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 126 bytes in 1 blocks are still reachable in loss record 84 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BEFA89: fusion_skirmish_init (lock.c:979)
==23887== by 0x4BEF45B: fusion_enter (fusion.c:3882)
==23887== by 0x4AFD421: dfb_core_create (core.c:330)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887== by 0x489E651: DirectFB_VideoInit (SDL_DirectFB_video.c:249)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 132 bytes in 1 blocks are still reachable in loss record 85 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x48A23F7: SDL_UDEV_Init (SDL_udev.c:122)
==23887== by 0x48A2963: SDL_EVDEV_Init (SDL_evdev.c:464)
==23887== by 0x489E787: DirectFB_VideoInit (SDL_DirectFB_video.c:286)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 136 bytes in 1 blocks are still reachable in loss record 86 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C0DC7D: direct_hash_insert (hash.c:214)
==23887== by 0x4C139ED: DirectResultTypeRegister (result.c:98)
==23887== by 0x4C0BDC1: DirectResult__init (direct_result.c:67)
==23887== by 0x4C0723B: __D_init_all (init.c:97)
==23887== by 0x4009E61: call_init.part.0 (dl-init.c:72)
==23887== by 0x4009F2B: call_init (dl-init.c:30)
==23887== by 0x4009F2B: _dl_init (dl-init.c:120)
==23887== by 0x40009C3: ??? (in /lib/ld-2.24.so)
==23887==
==23887== 136 bytes in 3 blocks are still reachable in loss record 87 of 114
==23887== at 0x48294FC: malloc (vg_replace_malloc.c:299)
==23887== by 0x4C10BCD: direct_dbg_strdup (mem.c:319)
==23887== by 0x4C1269B: direct_modules_explore_directory (modules.c:245)
==23887== by 0x4B3D641: dfb_system_lookup (system.c:266)
==23887== by 0x4AFD323: dfb_core_create (core.c:289)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887== by 0x489E651: DirectFB_VideoInit (SDL_DirectFB_video.c:249)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 144 bytes in 1 blocks are still reachable in loss record 88 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C1EB47: direct_thread_self (thread.c:216)
==23887== by 0x4C19915: get_trace_buffer (trace.c:108)
==23887== by 0x4C19A01: direct_trace_copy_buffer (trace.c:595)
==23887== by 0x4C10AF1: direct_dbg_calloc (mem.c:206)
==23887== by 0x4C0F157: direct_log_create (log.c:90)
==23887== by 0x4C0A79D: direct_config_set (conf.c:415)
==23887== by 0x4B71C79: dfb_config_set (conf.c:2255)
==23887== by 0x4B6E66B: dfb_config_read (conf.c:2525)
==23887== by 0x4B71F05: dfb_config_init (conf.c:2287)
==23887== by 0x4AA92A9: DirectFBInit (directfb.c:145)
==23887== by 0x489E5F5: DirectFB_VideoInit (SDL_DirectFB_video.c:228)
==23887==
==23887== 144 bytes in 9 blocks are still reachable in loss record 89 of 114
==23887== at 0x48294FC: malloc (vg_replace_malloc.c:299)
==23887== by 0x4945A77: strdup (strdup.c:42)
==23887== by 0x4C19A5F: direct_trace_copy_buffer (trace.c:611)
==23887== by 0x4C10BFD: direct_dbg_strdup (mem.c:326)
==23887== by 0x4BF5FF7: fusion_dbg_shstrdup (shmalloc.c:604)
==23887== by 0x4AFDA8B: core_arena_add_shared_field (core.c:1276)
==23887== by 0x4AFFEB5: dfb_core_part_initialize (core_parts.c:98)
==23887== by 0x4AFE157: dfb_core_initialize (core.c:1852)
==23887== by 0x4AABE45: DirectFB::ICore_Real::Initialize() (CoreDFB_real.cpp:80)
==23887== by 0x4AA9C6B: CoreDFB_Initialize (CoreDFB.cpp:70)
==23887== by 0x4AFD189: dfb_core_arena_initialize (core.c:1995)
==23887== by 0x4AFD493: dfb_core_create (core.c:356)
==23887==
==23887== 168 bytes in 1 blocks are still reachable in loss record 91 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4C1B231: direct_thread_create (thread.c:153)
==23887== by 0x4BEF49B: fusion_enter (fusion.c:3891)
==23887== by 0x4AFD421: dfb_core_create (core.c:330)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887== by 0x489E651: DirectFB_VideoInit (SDL_DirectFB_video.c:249)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 187 bytes in 1 blocks are still reachable in loss record 92 of 114
==23887== at 0x4829CE4: operator new(unsigned int) (vg_replace_malloc.c:328)
==23887== by 0x4D01121: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4D012A5: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4C08D51: Direct::StringBase<char>::operator=(Direct::StringBase<char> const&) (String.h:187)
==23887== by 0x4C08DAD: Direct::StringTLS::Copy(Direct::StringBase<char> const&) (String.cpp:81)
==23887== by 0x4C079DD: Direct::StringBase<char>::CopyTLS() (String.cpp:96)
==23887== by 0x4AD38ED: ToString_CoreSurface (Debug.cpp:516)
==23887== by 0x4B545AB: IDirectFBSurface_Construct (idirectfbsurface.c:3591)
==23887== by 0x4B5731F: IDirectFBSurface_Window_Construct (idirectfbsurface_window.c:426)
==23887== by 0x4B5DE47: IDirectFBWindow_GetSurface (idirectfbwindow.c:358)
==23887== by 0x489EAF1: DirectFB_CreateWindow (SDL_DirectFB_window.c:132)
==23887== by 0x489B263: SDL_CreateWindow_REAL (SDL_video.c:1403)
==23887==
==23887== 187 bytes in 1 blocks are still reachable in loss record 93 of 114
==23887== at 0x4829CE4: operator new(unsigned int) (vg_replace_malloc.c:328)
==23887== by 0x4D01121: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4D012A5: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4C08D51: Direct::StringBase<char>::operator=(Direct::StringBase<char> const&) (String.h:187)
==23887== by 0x4C08DAD: Direct::StringTLS::Copy(Direct::StringBase<char> const&) (String.cpp:81)
==23887== by 0x4C079DD: Direct::StringBase<char>::CopyTLS() (String.cpp:96)
==23887== by 0x4AD38ED: ToString_CoreSurface (Debug.cpp:516)
==23887== by 0x4B545AB: IDirectFBSurface_Construct (idirectfbsurface.c:3591)
==23887== by 0x4B5731F: IDirectFBSurface_Window_Construct (idirectfbsurface_window.c:426)
==23887== by 0x4B575DB: IDirectFBSurface_Window_GetSubSurface (idirectfbsurface_window.c:389)
==23887== by 0x489EB0B: DirectFB_CreateWindow (SDL_DirectFB_window.c:136)
==23887== by 0x489B263: SDL_CreateWindow_REAL (SDL_video.c:1403)
==23887==
==23887== 194 bytes in 1 blocks are still reachable in loss record 94 of 114
==23887== at 0x4829CE4: operator new(unsigned int) (vg_replace_malloc.c:328)
==23887== by 0x4D01121: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4D012A5: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4C08D51: Direct::StringBase<char>::operator=(Direct::StringBase<char> const&) (String.h:187)
==23887== by 0x4C08DAD: Direct::StringTLS::Copy(Direct::StringBase<char> const&) (String.cpp:81)
==23887== by 0x4C079DD: Direct::StringBase<char>::CopyTLS() (String.cpp:96)
==23887== by 0x4AD37CD: ToString_CoreLayerRegion (Debug.cpp:498)
==23887== by 0x4B1CED1: dfb_layer_region_flip_update (layer_region.c:499)
==23887== by 0x721C727: ???
==23887== by 0x721C9B9: ???
==23887== by 0x721CC53: ???
==23887== by 0x4B4A287: dfb_wm_update_stack (wm.c:1643)
==23887==
==23887== 194 bytes in 1 blocks are still reachable in loss record 95 of 114
==23887== at 0x4829CE4: operator new(unsigned int) (vg_replace_malloc.c:328)
==23887== by 0x4D01121: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4D012A5: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4C08D51: Direct::StringBase<char>::operator=(Direct::StringBase<char> const&) (String.h:187)
==23887== by 0x4C08DAD: Direct::StringTLS::Copy(Direct::StringBase<char> const&) (String.cpp:81)
==23887== by 0x4C079DD: Direct::StringBase<char>::CopyTLS() (String.cpp:96)
==23887== by 0x4AD37CD: ToString_CoreLayerRegion (Debug.cpp:498)
==23887== by 0x4B1CED1: dfb_layer_region_flip_update (layer_region.c:499)
==23887== by 0x721C727: ???
==23887== by 0x721C9B9: ???
==23887== by 0x721ED27: ???
==23887== by 0x4B4B037: dfb_wm_set_window_config (wm.c:1492)
==23887==
==23887== 200 bytes in 2 blocks are still reachable in loss record 96 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BF2D19: fusion_reactor_new (reactor.c:1641)
==23887== by 0x4BF1A8F: fusion_object_create (object.c:451)
==23887== by 0x4AFF927: dfb_core_create_surface_buffer (core.c:646)
==23887== by 0x4B3097D: dfb_surface_buffer_create (surface_buffer.c:149)
==23887== by 0x4B2B5B1: dfb_surface_reconfig (surface.c:864)
==23887== by 0x4B18079: dfb_layer_context_reallocate_surface (layer_context.c:1983)
==23887== by 0x4B18863: dfb_layer_context_set_configuration (layer_context.c:769)
==23887== by 0x4ABDD59: DirectFB::ILayerContext_Real::SetConfiguration(DFBDisplayLayerConfig const*) (CoreLayerContext_real.cpp:91)
==23887== by 0x4ABB76B: CoreLayerContext_SetConfiguration (CoreLayerContext.cpp:140)
==23887== by 0x4B58CE5: IDirectFBDisplayLayer_SetConfiguration (idirectfbdisplaylayer.c:625)
==23887==
==23887== 204 bytes in 3 blocks are still reachable in loss record 97 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4C12645: direct_modules_explore_directory (modules.c:235)
==23887== by 0x4B3D641: dfb_system_lookup (system.c:266)
==23887== by 0x4AFD323: dfb_core_create (core.c:289)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887== by 0x489E651: DirectFB_VideoInit (SDL_DirectFB_video.c:249)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 324 bytes in 9 blocks are still reachable in loss record 98 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C19A4D: direct_trace_copy_buffer (trace.c:606)
==23887== by 0x4C10BFD: direct_dbg_strdup (mem.c:326)
==23887== by 0x4BF5FF7: fusion_dbg_shstrdup (shmalloc.c:604)
==23887== by 0x4AFDA8B: core_arena_add_shared_field (core.c:1276)
==23887== by 0x4AFFEB5: dfb_core_part_initialize (core_parts.c:98)
==23887== by 0x4AFE157: dfb_core_initialize (core.c:1852)
==23887== by 0x4AABE45: DirectFB::ICore_Real::Initialize() (CoreDFB_real.cpp:80)
==23887== by 0x4AA9C6B: CoreDFB_Initialize (CoreDFB.cpp:70)
==23887== by 0x4AFD189: dfb_core_arena_initialize (core.c:1995)
==23887== by 0x4AFD493: dfb_core_create (core.c:356)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887==
==23887== 327 bytes in 9 blocks are still reachable in loss record 99 of 114
==23887== at 0x48294FC: malloc (vg_replace_malloc.c:299)
==23887== by 0x4C10BCD: direct_dbg_strdup (mem.c:319)
==23887== by 0x4BF5FF7: fusion_dbg_shstrdup (shmalloc.c:604)
==23887== by 0x4AFDA8B: core_arena_add_shared_field (core.c:1276)
==23887== by 0x4AFFEB5: dfb_core_part_initialize (core_parts.c:98)
==23887== by 0x4AFE157: dfb_core_initialize (core.c:1852)
==23887== by 0x4AABE45: DirectFB::ICore_Real::Initialize() (CoreDFB_real.cpp:80)
==23887== by 0x4AA9C6B: CoreDFB_Initialize (CoreDFB.cpp:70)
==23887== by 0x4AFD189: dfb_core_arena_initialize (core.c:1995)
==23887== by 0x4AFD493: dfb_core_create (core.c:356)
==23887== by 0x4AA8D45: IDirectFB_Construct (idirectfb.c:2072)
==23887== by 0x4AA95CB: DirectFBCreate (directfb.c:249)
==23887==
==23887== 460 bytes in 1 blocks are still reachable in loss record 100 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x7A2BCE5: ??? (in /lib/libudev.so.1.6.4)
==23887==
==23887== 480 bytes in 3 blocks are still reachable in loss record 101 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x400AB29: _dl_check_map_versions (dl-version.c:293)
==23887== by 0x400CA19: dl_open_worker (dl-open.c:275)
==23887== by 0x4009D67: _dl_catch_error (dl-error.c:187)
==23887== by 0x400C4A1: _dl_open (dl-open.c:649)
==23887== by 0x4C3CAB9: dlopen_doit (dlopen.c:66)
==23887== by 0x4009D67: _dl_catch_error (dl-error.c:187)
==23887== by 0x4C3CEEF: _dlerror_run (dlerror.c:163)
==23887== by 0x4C3CB0F: dlopen@@GLIBC_2.4 (dlopen.c:87)
==23887== by 0x489B509: SDL_LoadObject_REAL (SDL_sysloadso.c:36)
==23887== by 0x48A217B: SDL_UDEV_LoadLibrary (SDL_udev.c:259)
==23887== by 0x48A2407: SDL_UDEV_Init (SDL_udev.c:127)
==23887==
==23887== 629 bytes in 1 blocks are still reachable in loss record 102 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x40071F5: _dl_new_object (dl-object.c:75)
==23887== by 0x4004543: _dl_map_object_from_fd (dl-load.c:1006)
==23887== by 0x4005DFD: _dl_map_object (dl-load.c:2239)
==23887== by 0x400C837: dl_open_worker (dl-open.c:226)
==23887== by 0x4009D67: _dl_catch_error (dl-error.c:187)
==23887== by 0x400C4A1: _dl_open (dl-open.c:649)
==23887== by 0x4C3CAB9: dlopen_doit (dlopen.c:66)
==23887== by 0x4009D67: _dl_catch_error (dl-error.c:187)
==23887== by 0x4C3CEEF: _dlerror_run (dlerror.c:163)
==23887== by 0x4C3CB0F: dlopen@@GLIBC_2.4 (dlopen.c:87)
==23887== by 0x489B509: SDL_LoadObject_REAL (SDL_sysloadso.c:36)
==23887==
==23887== 776 bytes in 1 blocks are still reachable in loss record 103 of 114
==23887== at 0x48294FC: malloc (vg_replace_malloc.c:299)
==23887== by 0x487AC53: SDL_GetErrBuf (SDL_thread.c:242)
==23887== by 0x4842C39: SDL_ClearError_REAL (SDL_error.c:234)
==23887== by 0x4842325: SDL_InitSubSystem_REAL (SDL.c:116)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 900 bytes in 1 blocks are still reachable in loss record 104 of 114
==23887== at 0x4829CE4: operator new(unsigned int) (vg_replace_malloc.c:328)
==23887== by 0x4C08F69: Direct::StringTLS::create(void*, void*) (String.cpp:59)
==23887== by 0x4C09727: Direct::TLSObject2<Direct::StringTLS, Direct::StringTLS, Direct::StringTLS>::Get(void*) (TLSObject.h:132)
==23887== by 0x4C079D1: Direct::StringBase<char>::CopyTLS() (String.cpp:93)
==23887== by 0x4BEC005: ToString_FusionObject (Debug.cpp:72)
==23887== by 0x4BF0C7B: fusion_object_activate (object.c:581)
==23887== by 0x4B164FF: dfb_layer_context_init (layer_context.c:251)
==23887== by 0x4B19623: dfb_layer_create_context (layer_control.c:201)
==23887== by 0x4B19AB9: dfb_layer_get_primary_context (layer_control.c:311)
==23887== by 0x4ABAC45: DirectFB::ILayer_Real::GetPrimaryContext(DFBBoolean, __DFB_CoreLayerContext**) (CoreLayer_real.cpp:78)
==23887== by 0x4AB9E77: CoreLayer_GetPrimaryContext (CoreLayer.cpp:105)
==23887== by 0x4AA8BE1: InitIDirectFB_Async (idirectfb.c:2022)
==23887==
==23887== 919 bytes in 3 blocks are still reachable in loss record 105 of 114
==23887== at 0x4829CE4: operator new(unsigned int) (vg_replace_malloc.c:328)
==23887== by 0x4D01121: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4D012A5: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4C08D51: Direct::StringBase<char>::operator=(Direct::StringBase<char> const&) (String.h:187)
==23887== by 0x4C08DAD: Direct::StringTLS::Copy(Direct::StringBase<char> const&) (String.cpp:81)
==23887== by 0x4C079DD: Direct::StringBase<char>::CopyTLS() (String.cpp:96)
==23887== by 0x4AD38ED: ToString_CoreSurface (Debug.cpp:516)
==23887== by 0x4B545AB: IDirectFBSurface_Construct (idirectfbsurface.c:3591)
==23887== by 0x4AA84E9: IDirectFB_CreateSurface (idirectfb.c:1108)
==23887== by 0x489D58B: DirectFB_CreateTexture (SDL_DirectFB_render.c:569)
==23887== by 0x486C11B: SDL_CreateTexture_REAL (SDL_render.c:459)
==23887== by 0x486C1B1: SDL_CreateTextureFromSurface_REAL (SDL_render.c:536)
==23887==
==23887== 1,259 bytes in 2 blocks are still reachable in loss record 106 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x40071F5: _dl_new_object (dl-object.c:75)
==23887== by 0x4004543: _dl_map_object_from_fd (dl-load.c:1006)
==23887== by 0x4005DFD: _dl_map_object (dl-load.c:2239)
==23887== by 0x40087AB: openaux (dl-deps.c:63)
==23887== by 0x4009D67: _dl_catch_error (dl-error.c:187)
==23887== by 0x40089FB: _dl_map_object_deps (dl-deps.c:260)
==23887== by 0x400C901: dl_open_worker (dl-open.c:269)
==23887== by 0x4009D67: _dl_catch_error (dl-error.c:187)
==23887== by 0x400C4A1: _dl_open (dl-open.c:649)
==23887== by 0x4C3CAB9: dlopen_doit (dlopen.c:66)
==23887== by 0x4009D67: _dl_catch_error (dl-error.c:187)
==23887==
==23887== 1,636 bytes in 1 blocks are still reachable in loss record 107 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C19927: get_trace_buffer (trace.c:112)
==23887== by 0x4C19A01: direct_trace_copy_buffer (trace.c:595)
==23887== by 0x4C10AF1: direct_dbg_calloc (mem.c:206)
==23887== by 0x4C0F157: direct_log_create (log.c:90)
==23887== by 0x4C0A79D: direct_config_set (conf.c:415)
==23887== by 0x4B71C79: dfb_config_set (conf.c:2255)
==23887== by 0x4B6E66B: dfb_config_read (conf.c:2525)
==23887== by 0x4B71F05: dfb_config_init (conf.c:2287)
==23887== by 0x4AA92A9: DirectFBInit (directfb.c:145)
==23887== by 0x489E5F5: DirectFB_VideoInit (SDL_DirectFB_video.c:228)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887==
==23887== 1,760 bytes in 1 blocks are still reachable in loss record 108 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4B6E1B9: config_allocate (conf.c:434)
==23887== by 0x4B71EFD: dfb_config_init (conf.c:2284)
==23887== by 0x4AA92A9: DirectFBInit (directfb.c:145)
==23887== by 0x489E5F5: DirectFB_VideoInit (SDL_DirectFB_video.c:228)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 1,792 bytes in 1 blocks are still reachable in loss record 109 of 114
==23887== at 0x4829404: malloc (vg_replace_malloc.c:298)
==23887== by 0x482BF0B: realloc (vg_replace_malloc.c:785)
==23887== by 0x4C0EDC7: allocate_interface_desc (interface.c:542)
==23887== by 0x4C0EEB5: direct_dbg_interface_add (interface.c:585)
==23887== by 0x4AA95A7: DirectFBCreate (directfb.c:241)
==23887== by 0x489E651: DirectFB_VideoInit (SDL_DirectFB_video.c:249)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 6,201 bytes in 25 blocks are still reachable in loss record 110 of 114
==23887== at 0x4829CE4: operator new(unsigned int) (vg_replace_malloc.c:328)
==23887== by 0x4D01121: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4D012A5: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libstdc++.so.6.0.22)
==23887== by 0x4C08D51: Direct::StringBase<char>::operator=(Direct::StringBase<char> const&) (String.h:187)
==23887== by 0x4C08DAD: Direct::StringTLS::Copy(Direct::StringBase<char> const&) (String.cpp:81)
==23887== by 0x4C079DD: Direct::StringBase<char>::CopyTLS() (String.cpp:96)
==23887== by 0x4AD37CD: ToString_CoreLayerRegion (Debug.cpp:498)
==23887== by 0x4B1CED1: dfb_layer_region_flip_update (layer_region.c:499)
==23887== by 0x721C727: ???
==23887== by 0x721C9B9: ???
==23887== by 0x721CB39: ???
==23887== by 0x4B4A643: dfb_wm_update_window (wm.c:1685)
==23887==
==23887== 8,192 bytes in 2 blocks are still reachable in loss record 111 of 114
==23887== at 0x48294FC: malloc (vg_replace_malloc.c:299)
==23887== by 0x7A34D61: ??? (in /lib/libudev.so.1.6.4)
==23887==
==23887== 11,169 bytes in 1 blocks are definitely lost in loss record 112 of 114
==23887== at 0x48294FC: malloc (vg_replace_malloc.c:299)
==23887== by 0x4B6E1DB: config_allocate (conf.c:440)
==23887== by 0x4B71EFD: dfb_config_init (conf.c:2284)
==23887== by 0x4AA92A9: DirectFBInit (directfb.c:145)
==23887== by 0x489E5F5: DirectFB_VideoInit (SDL_DirectFB_video.c:228)
==23887== by 0x489B005: SDL_VideoInit_REAL (SDL_video.c:513)
==23887== by 0x48423E3: SDL_InitSubSystem_REAL (SDL.c:173)
==23887== by 0x8B13: main (memoryLeak.c:94)
==23887==
==23887== 33,416 bytes in 1 blocks are still reachable in loss record 113 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C0DD0F: direct_hash_insert (hash.c:237)
==23887== by 0x4C10B19: direct_dbg_calloc (mem.c:210)
==23887== by 0x4B6B4B7: IDirectFBEventBuffer_WindowReact (idirectfbinputbuffer.c:1046)
==23887== by 0x4BEF219: event_dispatcher_loop (fusion.c:3565)
==23887== by 0x4C1E05D: direct_thread_main (thread.c:470)
==23887== by 0x4D2C56B: start_thread (pthread_create.c:458)
==23887== by 0x4979301: ??? (clone.S:86)
==23887==
==23887== 65,596 bytes in 1 blocks are still reachable in loss record 114 of 114
==23887== at 0x482BC54: calloc (vg_replace_malloc.c:711)
==23887== by 0x4C10AC7: direct_dbg_calloc (mem.c:199)
==23887== by 0x4BEEB7B: _fusion_event_dispatcher_process (fusion.c:3651)
==23887== by 0x4BED661: fusion_call_execute (call.c:1651)
==23887== by 0x4BF43E1: fusion_ref_down (ref.c:1707)
==23887== by 0x4B30B35: dfb_surface_buffer_unlink (surface_buffer.h:246)
==23887== by 0x4B30BE9: dfb_surface_buffer_decouple (surface_buffer.c:216)
==23887== by 0x4B2B5FF: dfb_surface_reconfig (surface.c:845)
==23887== by 0x4B18079: dfb_layer_context_reallocate_surface (layer_context.c:1983)
==23887== by 0x4B18863: dfb_layer_context_set_configuration (layer_context.c:769)
==23887== by 0x4ABDD59: DirectFB::ILayerContext_Real::SetConfiguration(DFBDisplayLayerConfig const*) (CoreLayerContext_real.cpp:91)
==23887== by 0x4ABB76B: CoreLayerContext_SetConfiguration (CoreLayerContext.cpp:140)
==23887==
==23887== LEAK SUMMARY:
==23887== definitely lost: 11,169 bytes in 1 blocks
==23887== indirectly lost: 0 bytes in 0 blocks
==23887== possibly lost: 265 bytes in 6 blocks
==23887== still reachable: 129,677 bytes in 180 blocks
==23887== suppressed: 0 bytes in 0 blocks
valgrind logs are not giveing much information which is pointing to the SDL library.
any one, could you please provide the suggestions