Cuberite Forum
Possible memory leak in Squirrel - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Possible memory leak in Squirrel (/thread-512.html)

Pages: 1 2


Possible memory leak in Squirrel - xoft - 07-13-2012

After running the server for the first time under the debugger, I got this list of possible memory leaks. Dunno if they're valid, just noting them for later processing Wink

Code:
######## CRT-Leaks ########
--------------- Key: 56289, 52 bytes ---------
f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (56): malloc
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (43): std::_Allocate<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (145): std::allocator<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>::allocate
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1409): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Buynode
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1191): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Insert
c:\program files\microsoft visual studio 9.0\vc\include\xtree (674): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::insert
c:\program files\microsoft visual studio 9.0\vc\include\map (173): std::map<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> > >::operator[]
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (62): Sqrat::ClassType<cSquirrelBaseClass>::getClassTypeData
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (97): Sqrat::ClassType<cSquirrelBaseClass>::Initialized
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclass.h (62): Sqrat::Class<cSquirrelBaseClass,Sqrat::DefaultAllocator<cSquirrelBaseClass> >::Class<cSquirrelBaseClass,Sqrat::DefaultAllocator<cSquirrelBaseClass> >
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelbindings.cpp (16): BindSquirrel
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelfunctions.cpp (47): OpenSquirrelVM
c:\programovani\programy\cizi\mc-server.clean\source\cpluginmanager.cpp (83): cPluginManager::ReloadPluginsNow
c:\programovani\programy\cizi\mc-server.clean\source\croot.cpp (136): cRoot::Start
c:\programovani\programy\cizi\mc-server.clean\source\main.cpp (182): main
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (586): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): mainCRTStartup
ERROR: SymGetSymFromAddr64, GetLastError: 126 (Address: 00DBA307)
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 00DBA307)
00DBA307 ((module-name not available)): (filename not available): (function-name not available)
79E71B4C (mscorwks): (filename not available): CallDescrWorker
79E821B1 (mscorwks): (filename not available): CallDescrWorkerWithHandler
79E96501 (mscorwks): (filename not available): MethodDesc::CallDescr
79E96534 (mscorwks): (filename not available): MethodDesc::CallTargetWorker
79E96552 (mscorwks): (filename not available): MethodDescCallSite::CallWithValueTypes
79F273B4 (mscorwks): (filename not available): ClassLoader::RunMain
79EEF965 (mscorwks): (filename not available): Assembly::ExecuteMainMethod
79EEFEB5 (mscorwks): (filename not available): SystemDomain::ExecuteMainMethod
79EF009F (mscorwks): (filename not available): ExecuteEXE
79EEFFCF (mscorwks): (filename not available): _CorExeMain
603B55AB (mscoreei): (filename not available): _CorExeMain
79007F16 (mscoree): (filename not available): ShellShim__CorExeMain
79004DE3 (mscoree): (filename not available): _CorExeMain_Exported
7C817067 (KERNEL32): (filename not available): BaseProcessStart
--------------- Key: 56316, 52 bytes ---------
f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (56): malloc
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (43): std::_Allocate<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (145): std::allocator<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>::allocate
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1409): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Buynode
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1191): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Insert
c:\program files\microsoft visual studio 9.0\vc\include\xtree (674): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::insert
c:\program files\microsoft visual studio 9.0\vc\include\map (173): std::map<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> > >::operator[]
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (62): Sqrat::ClassType<Vector3f>::getClassTypeData
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (97): Sqrat::ClassType<Vector3f>::Initialized
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclass.h (62): Sqrat::Class<Vector3f,Sqrat::NoConstructor>::Class<Vector3f,Sqrat::NoConstructor>
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelbindings.cpp (23): BindSquirrel
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelfunctions.cpp (47): OpenSquirrelVM
c:\programovani\programy\cizi\mc-server.clean\source\cpluginmanager.cpp (83): cPluginManager::ReloadPluginsNow
c:\programovani\programy\cizi\mc-server.clean\source\croot.cpp (136): cRoot::Start
c:\programovani\programy\cizi\mc-server.clean\source\main.cpp (182): main
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (586): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): mainCRTStartup
ERROR: SymGetSymFromAddr64, GetLastError: 126 (Address: 00DBA307)
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 00DBA307)
00DBA307 ((module-name not available)): (filename not available): (function-name not available)
79E71B4C (mscorwks): (filename not available): CallDescrWorker
79E821B1 (mscorwks): (filename not available): CallDescrWorkerWithHandler
79E96501 (mscorwks): (filename not available): MethodDesc::CallDescr
79E96534 (mscorwks): (filename not available): MethodDesc::CallTargetWorker
79E96552 (mscorwks): (filename not available): MethodDescCallSite::CallWithValueTypes
79F273B4 (mscorwks): (filename not available): ClassLoader::RunMain
79EEF965 (mscorwks): (filename not available): Assembly::ExecuteMainMethod
79EEFEB5 (mscorwks): (filename not available): SystemDomain::ExecuteMainMethod
79EF009F (mscorwks): (filename not available): ExecuteEXE
79EEFFCF (mscorwks): (filename not available): _CorExeMain
603B55AB (mscoreei): (filename not available): _CorExeMain
79007F16 (mscoree): (filename not available): ShellShim__CorExeMain
79004DE3 (mscoree): (filename not available): _CorExeMain_Exported
7C817067 (KERNEL32): (filename not available): BaseProcessStart
--------------- Key: 56361, 52 bytes ---------
f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (56): malloc
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (43): std::_Allocate<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (145): std::allocator<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>::allocate
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1409): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Buynode
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1191): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Insert
c:\program files\microsoft visual studio 9.0\vc\include\xtree (674): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::insert
c:\program files\microsoft visual studio 9.0\vc\include\map (173): std::map<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> > >::operator[]
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (62): Sqrat::ClassType<Vector3d>::getClassTypeData
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (97): Sqrat::ClassType<Vector3d>::Initialized
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclass.h (62): Sqrat::Class<Vector3d,Sqrat::NoConstructor>::Class<Vector3d,Sqrat::NoConstructor>
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelbindings.cpp (33): BindSquirrel
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelfunctions.cpp (47): OpenSquirrelVM
c:\programovani\programy\cizi\mc-server.clean\source\cpluginmanager.cpp (83): cPluginManager::ReloadPluginsNow
c:\programovani\programy\cizi\mc-server.clean\source\croot.cpp (136): cRoot::Start
c:\programovani\programy\cizi\mc-server.clean\source\main.cpp (182): main
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (586): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): mainCRTStartup
ERROR: SymGetSymFromAddr64, GetLastError: 126 (Address: 00DBA307)
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 00DBA307)
00DBA307 ((module-name not available)): (filename not available): (function-name not available)
79E71B4C (mscorwks): (filename not available): CallDescrWorker
79E821B1 (mscorwks): (filename not available): CallDescrWorkerWithHandler
79E96501 (mscorwks): (filename not available): MethodDesc::CallDescr
79E96534 (mscorwks): (filename not available): MethodDesc::CallTargetWorker
79E96552 (mscorwks): (filename not available): MethodDescCallSite::CallWithValueTypes
79F273B4 (mscorwks): (filename not available): ClassLoader::RunMain
79EEF965 (mscorwks): (filename not available): Assembly::ExecuteMainMethod
79EEFEB5 (mscorwks): (filename not available): SystemDomain::ExecuteMainMethod
79EF009F (mscorwks): (filename not available): ExecuteEXE
79EEFFCF (mscorwks): (filename not available): _CorExeMain
603B55AB (mscoreei): (filename not available): _CorExeMain
79007F16 (mscoree): (filename not available): ShellShim__CorExeMain
79004DE3 (mscoree): (filename not available): _CorExeMain_Exported
7C817067 (KERNEL32): (filename not available): BaseProcessStart
--------------- Key: 56399, 52 bytes ---------
f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (56): malloc
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (43): std::_Allocate<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (145): std::allocator<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>::allocate
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1409): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Buynode
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1191): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Insert
c:\program files\microsoft visual studio 9.0\vc\include\xtree (674): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::insert
c:\program files\microsoft visual studio 9.0\vc\include\map (173): std::map<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> > >::operator[]
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (62): Sqrat::ClassType<cEntity>::getClassTypeData
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (97): Sqrat::ClassType<cEntity>::Initialized
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclass.h (62): Sqrat::Class<cEntity,Sqrat::NoConstructor>::Class<cEntity,Sqrat::NoConstructor>
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelbindings.cpp (43): BindSquirrel
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelfunctions.cpp (47): OpenSquirrelVM
c:\programovani\programy\cizi\mc-server.clean\source\cpluginmanager.cpp (83): cPluginManager::ReloadPluginsNow
c:\programovani\programy\cizi\mc-server.clean\source\croot.cpp (136): cRoot::Start
c:\programovani\programy\cizi\mc-server.clean\source\main.cpp (182): main
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (586): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): mainCRTStartup
ERROR: SymGetSymFromAddr64, GetLastError: 126 (Address: 00DBA307)
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 00DBA307)
00DBA307 ((module-name not available)): (filename not available): (function-name not available)
79E71B4C (mscorwks): (filename not available): CallDescrWorker
79E821B1 (mscorwks): (filename not available): CallDescrWorkerWithHandler
79E96501 (mscorwks): (filename not available): MethodDesc::CallDescr
79E96534 (mscorwks): (filename not available): MethodDesc::CallTargetWorker
79E96552 (mscorwks): (filename not available): MethodDescCallSite::CallWithValueTypes
79F273B4 (mscorwks): (filename not available): ClassLoader::RunMain
79EEF965 (mscorwks): (filename not available): Assembly::ExecuteMainMethod
79EEFEB5 (mscorwks): (filename not available): SystemDomain::ExecuteMainMethod
79EF009F (mscorwks): (filename not available): ExecuteEXE
79EEFFCF (mscorwks): (filename not available): _CorExeMain
603B55AB (mscoreei): (filename not available): _CorExeMain
79007F16 (mscoree): (filename not available): ShellShim__CorExeMain
79004DE3 (mscoree): (filename not available): _CorExeMain_Exported
7C817067 (KERNEL32): (filename not available): BaseProcessStart
--------------- Key: 56509, 52 bytes ---------
f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (56): malloc
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (43): std::_Allocate<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (145): std::allocator<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>::allocate
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1409): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Buynode
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1191): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Insert
c:\program files\microsoft visual studio 9.0\vc\include\xtree (674): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::insert
c:\program files\microsoft visual studio 9.0\vc\include\map (173): std::map<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> > >::operator[]
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (62): Sqrat::ClassType<cPawn>::getClassTypeData
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (97): Sqrat::ClassType<cPawn>::Initialized
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclass.h (342): Sqrat::DerivedClass<cPawn,cEntity,Sqrat::NoConstructor>::DerivedClass<cPawn,cEntity,Sqrat::NoConstructor>
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelbindings.cpp (83): BindSquirrel
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelfunctions.cpp (47): OpenSquirrelVM
c:\programovani\programy\cizi\mc-server.clean\source\cpluginmanager.cpp (83): cPluginManager::ReloadPluginsNow
c:\programovani\programy\cizi\mc-server.clean\source\croot.cpp (136): cRoot::Start
c:\programovani\programy\cizi\mc-server.clean\source\main.cpp (182): main
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (586): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): mainCRTStartup
ERROR: SymGetSymFromAddr64, GetLastError: 126 (Address: 00DBA307)
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 00DBA307)
00DBA307 ((module-name not available)): (filename not available): (function-name not available)
79E71B4C (mscorwks): (filename not available): CallDescrWorker
79E821B1 (mscorwks): (filename not available): CallDescrWorkerWithHandler
79E96501 (mscorwks): (filename not available): MethodDesc::CallDescr
79E96534 (mscorwks): (filename not available): MethodDesc::CallTargetWorker
79E96552 (mscorwks): (filename not available): MethodDescCallSite::CallWithValueTypes
79F273B4 (mscorwks): (filename not available): ClassLoader::RunMain
79EEF965 (mscorwks): (filename not available): Assembly::ExecuteMainMethod
79EEFEB5 (mscorwks): (filename not available): SystemDomain::ExecuteMainMethod
79EF009F (mscorwks): (filename not available): ExecuteEXE
79EEFFCF (mscorwks): (filename not available): _CorExeMain
603B55AB (mscoreei): (filename not available): _CorExeMain
79007F16 (mscoree): (filename not available): ShellShim__CorExeMain
79004DE3 (mscoree): (filename not available): _CorExeMain_Exported
7C817067 (KERNEL32): (filename not available): BaseProcessStart
--------------- Key: 56574, 52 bytes ---------
f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (56): malloc
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (43): std::_Allocate<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (145): std::allocator<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>::allocate
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1409): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Buynode
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1191): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Insert
c:\program files\microsoft visual studio 9.0\vc\include\xtree (674): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::insert
c:\program files\microsoft visual studio 9.0\vc\include\map (173): std::map<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> > >::operator[]
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (62): Sqrat::ClassType<cPlayer>::getClassTypeData
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (97): Sqrat::ClassType<cPlayer>::Initialized
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclass.h (342): Sqrat::DerivedClass<cPlayer,cPawn,Sqrat::NoConstructor>::DerivedClass<cPlayer,cPawn,Sqrat::NoConstructor>
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelbindings.cpp (102): BindSquirrel
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelfunctions.cpp (47): OpenSquirrelVM
c:\programovani\programy\cizi\mc-server.clean\source\cpluginmanager.cpp (83): cPluginManager::ReloadPluginsNow
c:\programovani\programy\cizi\mc-server.clean\source\croot.cpp (136): cRoot::Start
c:\programovani\programy\cizi\mc-server.clean\source\main.cpp (182): main
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (586): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): mainCRTStartup
ERROR: SymGetSymFromAddr64, GetLastError: 126 (Address: 00DBA307)
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 00DBA307)
00DBA307 ((module-name not available)): (filename not available): (function-name not available)
79E71B4C (mscorwks): (filename not available): CallDescrWorker
79E821B1 (mscorwks): (filename not available): CallDescrWorkerWithHandler
79E96501 (mscorwks): (filename not available): MethodDesc::CallDescr
79E96534 (mscorwks): (filename not available): MethodDesc::CallTargetWorker
79E96552 (mscorwks): (filename not available): MethodDescCallSite::CallWithValueTypes
79F273B4 (mscorwks): (filename not available): ClassLoader::RunMain
79EEF965 (mscorwks): (filename not available): Assembly::ExecuteMainMethod
79EEFEB5 (mscorwks): (filename not available): SystemDomain::ExecuteMainMethod
79EF009F (mscorwks): (filename not available): ExecuteEXE
79EEFFCF (mscorwks): (filename not available): _CorExeMain
603B55AB (mscoreei): (filename not available): _CorExeMain
79007F16 (mscoree): (filename not available): ShellShim__CorExeMain
79004DE3 (mscoree): (filename not available): _CorExeMain_Exported
7C817067 (KERNEL32): (filename not available): BaseProcessStart
--------------- Key: 56697, 52 bytes ---------
f:\dd\vctools\crt_bld\self_x86\crt\src\dbgmalloc.c (56): malloc
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (43): std::_Allocate<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>
c:\program files\microsoft visual studio 9.0\vc\include\xmemory (145): std::allocator<std::_Tree_nod<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Node>::allocate
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1409): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Buynode
c:\program files\microsoft visual studio 9.0\vc\include\xtree (1191): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::_Insert
c:\program files\microsoft visual studio 9.0\vc\include\xtree (674): std::_Tree<std::_Tmap_traits<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> >,0> >::insert
c:\program files\microsoft visual studio 9.0\vc\include\map (173): std::map<SQVM *,Sqrat::ClassTypeData,std::less<SQVM *>,std::allocator<std::pair<SQVM * const,Sqrat::ClassTypeData> > >::operator[]
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (62): Sqrat::ClassType<SquirrelStringArray>::getClassTypeData
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclasstype.h (97): Sqrat::ClassType<SquirrelStringArray>::Initialized
c:\programovani\programy\cizi\mc-server.clean\squirrel_3_0_1_stable\sqrat\sqrat\sqratclass.h (62): Sqrat::Class<SquirrelStringArray,Sqrat::DefaultAllocator<SquirrelStringArray> >::Class<SquirrelStringArray,Sqrat::DefaultAllocator<SquirrelStringArray> >
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelbindings.cpp (144): BindSquirrel
c:\programovani\programy\cizi\mc-server.clean\source\squirrelbindings\squirrelfunctions.cpp (47): OpenSquirrelVM
c:\programovani\programy\cizi\mc-server.clean\source\cpluginmanager.cpp (83): cPluginManager::ReloadPluginsNow
c:\programovani\programy\cizi\mc-server.clean\source\croot.cpp (136): cRoot::Start
c:\programovani\programy\cizi\mc-server.clean\source\main.cpp (182): main
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (586): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): mainCRTStartup
ERROR: SymGetSymFromAddr64, GetLastError: 126 (Address: 00DBA307)
ERROR: SymGetModuleInfo64, GetLastError: 1114 (Address: 00DBA307)
00DBA307 ((module-name not available)): (filename not available): (function-name not available)
79E71B4C (mscorwks): (filename not available): CallDescrWorker
79E821B1 (mscorwks): (filename not available): CallDescrWorkerWithHandler
79E96501 (mscorwks): (filename not available): MethodDesc::CallDescr
79E96534 (mscorwks): (filename not available): MethodDesc::CallTargetWorker
79E96552 (mscorwks): (filename not available): MethodDescCallSite::CallWithValueTypes
79F273B4 (mscorwks): (filename not available): ClassLoader::RunMain
79EEF965 (mscorwks): (filename not available): Assembly::ExecuteMainMethod
79EEFEB5 (mscorwks): (filename not available): SystemDomain::ExecuteMainMethod
79EF009F (mscorwks): (filename not available): ExecuteEXE

One thing that makes me wonder is why there's "mscorwks" at all - is Squirrel using some perverted way to hook into C# / CLR runtime, or is it just a glitch of the memleak detector? But why would the DLL be loaded at all?


RE: Possible memory leak in Squirrel - Lapayo - 07-13-2012

I also saw this memory leaks, but I don´t know if they are true.
It looks like the leak is caused while binding a class to squirrel.
But in other projects I bound classes the same way and I haven´t got memory leak warnings. (But I was using VLD, not the internal detector)


RE: Possible memory leak in Squirrel - Lapayo - 07-13-2012

I just checked it with VLD and it says:

No memory leaks detected.

Now we have a problemBig Grin
Which detection is more trustable?Big Grin

Nevertheless this shouldn´t be a big problem. The possible leak only seems to be in the binding, so the leak isn´t fatal, because the bindings are only called once. (Don´t know if it leaks more often if you use the restart command)


RE: Possible memory leak in Squirrel - FakeTruth - 07-13-2012

These leaks weren't there when using the 'old' way of binding classes/functions


RE: Possible memory leak in Squirrel - Lapayo - 07-13-2012

I know they are in the new bindings code.


RE: Possible memory leak in Squirrel - xoft - 07-13-2012

The leaks don't happen every time, which leads me to believe that there is a "race condition" over the leak detection code and bindings deinit.


RE: Possible memory leak in Squirrel - FakeTruth - 07-13-2012

Does that mean there are global/static variables?


RE: Possible memory leak in Squirrel - Lapayo - 07-13-2012

There is a Static RootTable() and a Static ConstTable. I don´t know if they are destroyed by destroying the squirrel vm.
But they only contain the bound classes, enums and functions.


RE: Possible memory leak in Squirrel - xoft - 07-13-2012

That's probably it, static data isn't destroyed deterministically, so they probably get destroyed after the leakfinder finishes. Is there a way to flush those tables programatically? Might be the easiest way to get rid of this issue.


RE: Possible memory leak in Squirrel - Lapayo - 07-13-2012

I don´t know, but I wrote a message to the creator of the bindings lib.
I will let you know if he answers.