From b89896b3cf83c56d5b516add31e26333a6819c5d Mon Sep 17 00:00:00 2001 From: rahuel Date: Wed, 9 Mar 2005 13:34:07 +0000 Subject: [PATCH] Simple tests to check Memory Leaks --- examples/GraphGOTOAddMemory.py | 68 +++++++++ examples/GraphGOTOAddMemory.xml | 159 +++++++++++++++++++++ examples/GraphGOTOMemory.py | 47 +++++++ examples/GraphGOTOMemory.xml | 91 +++++++++++++ examples/GraphLoopMemory.py | 93 +++++++++++++ examples/GraphLoopMemory.xml | 235 ++++++++++++++++++++++++++++++++ 6 files changed, 693 insertions(+) create mode 100644 examples/GraphGOTOAddMemory.py create mode 100644 examples/GraphGOTOAddMemory.xml create mode 100644 examples/GraphGOTOMemory.py create mode 100644 examples/GraphGOTOMemory.xml create mode 100644 examples/GraphLoopMemory.py create mode 100644 examples/GraphLoopMemory.xml diff --git a/examples/GraphGOTOAddMemory.py b/examples/GraphGOTOAddMemory.py new file mode 100644 index 0000000..5484a36 --- /dev/null +++ b/examples/GraphGOTOAddMemory.py @@ -0,0 +1,68 @@ + +# Generated python file of Graph GraphGOTOAddMemory + +from SuperV import * + +# Graph creation of GraphGOTOAddMemory +def DefGraphGOTOAddMemory() : + GraphGOTOAddMemory = Graph( 'GraphGOTOAddMemory' ) + GraphGOTOAddMemory.SetName( 'GraphGOTOAddMemory' ) + GraphGOTOAddMemory.SetAuthor( 'JR' ) + GraphGOTOAddMemory.SetComment( 'To study memory leaks' ) + GraphGOTOAddMemory.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + AddWithoutSleep = GraphGOTOAddMemory.FNode( 'AddComponent' , 'AddComponent' , 'AddWithoutSleep' ) + AddWithoutSleep.SetName( 'AddWithoutSleep' ) + AddWithoutSleep.SetAuthor( '' ) + AddWithoutSleep.SetContainer( 'localhost/FactoryServer' ) + AddWithoutSleep.SetComment( 'AddWithoutSleep from AddComponent' ) + AddWithoutSleep.Coords( 297 , 138 ) + IAddWithoutSleepx = AddWithoutSleep.GetInPort( 'x' ) + IAddWithoutSleepy = AddWithoutSleep.GetInPort( 'y' ) + IAddWithoutSleepGate = AddWithoutSleep.GetInPort( 'Gate' ) + OAddWithoutSleepFuncValue = AddWithoutSleep.GetOutPort( 'FuncValue' ) + OAddWithoutSleepz = AddWithoutSleep.GetOutPort( 'z' ) + OAddWithoutSleepGate = AddWithoutSleep.GetOutPort( 'Gate' ) + + # Creation of InLine Nodes + PyInLine = [] + InLine = GraphGOTOAddMemory.INode( '' , PyInLine ) + InLine.SetName( 'InLine' ) + InLine.SetAuthor( '' ) + InLine.SetComment( 'Compute Node' ) + InLine.Coords( 74 , 178 ) + IInLineGate = InLine.GetInPort( 'Gate' ) + OInLineGate = InLine.GetOutPort( 'Gate' ) + + # Creation of GOTO Nodes + PyGoTo = [] + GoTo = GraphGOTOAddMemory.GNode( '' , PyGoTo , 'InLine' ) + GoTo.SetName( 'GoTo' ) + GoTo.SetAuthor( '' ) + GoTo.SetComment( 'Compute Node' ) + GoTo.Coords( 533 , 218 ) + IGoToGate = GoTo.GetInPort( 'Gate' ) + OGoToGate = GoTo.GetOutPort( 'Gate' ) + + # Creation of Links + LInLineGateAddWithoutSleepGate = GraphGOTOAddMemory.Link( OInLineGate , IAddWithoutSleepGate ) + + LGoToGateInLineGate = GraphGOTOAddMemory.Link( OGoToGate , IInLineGate ) + LGoToGateInLineGate.AddCoord( 1 , 69 , 420 ) + LGoToGateInLineGate.AddCoord( 2 , 700 , 420 ) + + LAddWithoutSleepGateGoToGate = GraphGOTOAddMemory.Link( OAddWithoutSleepGate , IGoToGate ) + + # Input datas + IAddWithoutSleepx.Input( 1 ) + IAddWithoutSleepy.Input( 2 ) + + # Output Ports of the graph + #OAddWithoutSleepFuncValue = AddWithoutSleep.GetOutPort( 'FuncValue' ) + #OAddWithoutSleepz = AddWithoutSleep.GetOutPort( 'z' ) + return GraphGOTOAddMemory + + +GraphGOTOAddMemory = DefGraphGOTOAddMemory() diff --git a/examples/GraphGOTOAddMemory.xml b/examples/GraphGOTOAddMemory.xml new file mode 100644 index 0000000..02c082b --- /dev/null +++ b/examples/GraphGOTOAddMemory.xml @@ -0,0 +1,159 @@ + + + + + +? + ? + GraphGOTOAddMemory + 1 + ? + +GraphGOTOAddMemory_1 + + +double + AddWithoutSleep__x + +double + AddWithoutSleep__y + + +double + AddWithoutSleep__FuncValue + +double + AddWithoutSleep__z + + + 17/2/2005 - 14:8:55 + 21/2/2005 - 10:9:51 + 2.0 + JR + ? + To study memory leaks + 0 + 0 + + +? + ? + InLine + 3 + ? + +InLine + + + + + +? + + 21/2/2005 - 10:9:51 + 21/2/2005 - 10:9:51 + 2.0 + ? + ? + Compute Node + 74 + 178 + +? + ? + GoTo + 8 + InLine + +GoTo + + + + + +? + + 21/2/2005 - 10:9:51 + 21/2/2005 - 10:9:51 + 2.0 + ? + ? + Compute Node + 533 + 218 + +AddComponent + AddComponent + AddWithoutSleep + 0 + ? + +AddWithoutSleep + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 21/2/2005 - 10:9:51 + 21/2/2005 - 10:9:51 + 2.0 + ? + localhost/FactoryServer + AddWithoutSleep from AddComponent + 297 + 138 + + +InLine + Gate + AddWithoutSleep + Gate + + +GoTo + Gate + InLine + Gate + + +69 + 420 + +700 + 420 + +AddWithoutSleep + Gate + GoTo + Gate + + + +GraphGOTOAddMemory + AddWithoutSleep__x + AddWithoutSleep + x + +7 + 1 + + +GraphGOTOAddMemory + AddWithoutSleep__y + AddWithoutSleep + y + +7 + 2 + diff --git a/examples/GraphGOTOMemory.py b/examples/GraphGOTOMemory.py new file mode 100644 index 0000000..45d24c7 --- /dev/null +++ b/examples/GraphGOTOMemory.py @@ -0,0 +1,47 @@ + +# Generated python file of Graph GraphGOTOMemory + +from SuperV import * + +# Graph creation of GraphGOTOMemory +def DefGraphGOTOMemory() : + GraphGOTOMemory = Graph( 'GraphGOTOMemory' ) + GraphGOTOMemory.SetName( 'GraphGOTOMemory' ) + GraphGOTOMemory.SetAuthor( 'JR' ) + GraphGOTOMemory.SetComment( 'To study memory leaks' ) + GraphGOTOMemory.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of InLine Nodes + PyInLine = [] + InLine = GraphGOTOMemory.INode( '' , PyInLine ) + InLine.SetName( 'InLine' ) + InLine.SetAuthor( '' ) + InLine.SetComment( 'Compute Node' ) + InLine.Coords( 74 , 178 ) + IInLineGate = InLine.GetInPort( 'Gate' ) + OInLineGate = InLine.GetOutPort( 'Gate' ) + + # Creation of GOTO Nodes + PyGoTo = [] + GoTo = GraphGOTOMemory.GNode( '' , PyGoTo , 'InLine' ) + GoTo.SetName( 'GoTo' ) + GoTo.SetAuthor( '' ) + GoTo.SetComment( 'Compute Node' ) + GoTo.Coords( 533 , 218 ) + IGoToGate = GoTo.GetInPort( 'Gate' ) + OGoToGate = GoTo.GetOutPort( 'Gate' ) + + # Creation of Links + LInLineGateGoToGate = GraphGOTOMemory.Link( OInLineGate , IGoToGate ) + + LGoToGateInLineGate = GraphGOTOMemory.Link( OGoToGate , IInLineGate ) + LGoToGateInLineGate.AddCoord( 1 , 69 , 420 ) + LGoToGateInLineGate.AddCoord( 2 , 700 , 420 ) + + # Output Ports of the graph + return GraphGOTOMemory + + +GraphGOTOMemory = DefGraphGOTOMemory() diff --git a/examples/GraphGOTOMemory.xml b/examples/GraphGOTOMemory.xml new file mode 100644 index 0000000..d9a98a9 --- /dev/null +++ b/examples/GraphGOTOMemory.xml @@ -0,0 +1,91 @@ + + + + + +? + ? + GraphGOTOMemory + 1 + ? + +GraphGOTOAddMemory_2 + + + + + 17/2/2005 - 14:8:55 + 21/2/2005 - 10:10:15 + 2.0 + JR + ? + To study memory leaks + 0 + 0 + + +? + ? + InLine + 3 + ? + +InLine + + + + + +? + + 21/2/2005 - 10:10:15 + 21/2/2005 - 10:10:15 + 2.0 + ? + ? + Compute Node + 74 + 178 + +? + ? + GoTo + 8 + InLine + +GoTo + + + + + +? + + 21/2/2005 - 10:10:15 + 21/2/2005 - 10:10:15 + 2.0 + ? + ? + Compute Node + 533 + 218 + + +InLine + Gate + GoTo + Gate + + +GoTo + Gate + InLine + Gate + + +69 + 420 + +700 + 420 + diff --git a/examples/GraphLoopMemory.py b/examples/GraphLoopMemory.py new file mode 100644 index 0000000..ac87929 --- /dev/null +++ b/examples/GraphLoopMemory.py @@ -0,0 +1,93 @@ + +# Generated python file of Graph GraphLoopMemory_1 + +from SuperV import * + +# Graph creation of GraphLoopMemory_1 +def DefGraphLoopMemory_1() : + GraphLoopMemory_1 = Graph( 'GraphLoopMemory_1' ) + GraphLoopMemory_1.SetName( 'GraphLoopMemory_1' ) + GraphLoopMemory_1.SetAuthor( 'JR' ) + GraphLoopMemory_1.SetComment( 'For solving of memory leaks' ) + GraphLoopMemory_1.Coords( 0 , 0 ) + + # Creation of Factory Nodes + + # Creation of Loop Nodes + PyInit = [] + PyInit.append( 'def Init(Index,Min,Max,Incr) : ' ) + PyInit.append( ' if Min <= Max : ' ) + PyInit.append( ' Index = Min ' ) + PyInit.append( ' else : ' ) + PyInit.append( ' Index = Max ' ) + PyInit.append( ' return Index,Min,Max,Incr ' ) + PyMoreInit = [] + PyMoreInit.append( 'def More(Index,Min,Max,Incr) : ' ) + PyMoreInit.append( ' if Index < Max : ' ) + PyMoreInit.append( ' DoLoop = 1 ' ) + PyMoreInit.append( ' else : ' ) + PyMoreInit.append( ' DoLoop = 0 ' ) + PyMoreInit.append( ' return DoLoop,Index,Min,Max,Incr ' ) + PyNextInit = [] + PyNextInit.append( 'def Next(Index,Min,Max,Incr) : ' ) + PyNextInit.append( ' Index = Index + Incr ' ) + PyNextInit.append( ' return Index,Min,Max,Incr ' ) + Init,EndInit = GraphLoopMemory_1.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) + EndInit.SetName( 'EndInit' ) + EndInit.SetAuthor( '' ) + EndInit.SetComment( 'Compute Node' ) + EndInit.Coords( 366 , 262 ) + PyEndInit = [] + EndInit.SetPyFunction( '' , PyEndInit ) + IInitDoLoop = Init.GetInPort( 'DoLoop' ) + IInitIndex = Init.InPort( 'Index' , 'long' ) + IInitMin = Init.InPort( 'Min' , 'long' ) + IInitMax = Init.InPort( 'Max' , 'long' ) + IInitIncr = Init.InPort( 'Incr' , 'long' ) + IInitGate = Init.GetInPort( 'Gate' ) + OInitDoLoop = Init.GetOutPort( 'DoLoop' ) + OInitIndex = Init.GetOutPort( 'Index' ) + OInitMin = Init.GetOutPort( 'Min' ) + OInitMax = Init.GetOutPort( 'Max' ) + OInitIncr = Init.GetOutPort( 'Incr' ) + IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' ) + IEndInitIndex = EndInit.GetInPort( 'Index' ) + IEndInitMin = EndInit.GetInPort( 'Min' ) + IEndInitMax = EndInit.GetInPort( 'Max' ) + IEndInitIncr = EndInit.GetInPort( 'Incr' ) + IEndInitGate = EndInit.GetInPort( 'Gate' ) + OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' ) + OEndInitIndex = EndInit.GetOutPort( 'Index' ) + OEndInitMin = EndInit.GetOutPort( 'Min' ) + OEndInitMax = EndInit.GetOutPort( 'Max' ) + OEndInitIncr = EndInit.GetOutPort( 'Incr' ) + OEndInitGate = EndInit.GetOutPort( 'Gate' ) + Init.SetName( 'Init' ) + Init.SetAuthor( '' ) + Init.SetComment( 'Compute Node' ) + Init.Coords( 17 , 257 ) + + # Creation of Links + LInitIndexEndInitIndex = GraphLoopMemory_1.Link( OInitIndex , IEndInitIndex ) + + LInitMinEndInitMin = GraphLoopMemory_1.Link( OInitMin , IEndInitMin ) + + LInitMaxEndInitMax = GraphLoopMemory_1.Link( OInitMax , IEndInitMax ) + + LInitIncrEndInitIncr = GraphLoopMemory_1.Link( OInitIncr , IEndInitIncr ) + + # Input datas + IInitIndex.Input( 0 ) + IInitMin.Input( 5 ) + IInitMax.Input( 100000 ) + IInitIncr.Input( 1 ) + + # Output Ports of the graph + #OEndInitIndex = EndInit.GetOutPort( 'Index' ) + #OEndInitMin = EndInit.GetOutPort( 'Min' ) + #OEndInitMax = EndInit.GetOutPort( 'Max' ) + #OEndInitIncr = EndInit.GetOutPort( 'Incr' ) + return GraphLoopMemory_1 + + +GraphLoopMemory_1 = DefGraphLoopMemory_1() diff --git a/examples/GraphLoopMemory.xml b/examples/GraphLoopMemory.xml new file mode 100644 index 0000000..713b4e5 --- /dev/null +++ b/examples/GraphLoopMemory.xml @@ -0,0 +1,235 @@ + + + + + +? + ? + GraphLoopMemory_1 + 1 + ? + +GraphLoopMemory_1 + + +long + Init__Index + +long + Init__Min + +long + Init__Max + +long + Init__Incr + + +long + EndInit__Index + +long + EndInit__Min + +long + EndInit__Max + +long + EndInit__Incr + + + 24/3/2003 - 14:44:35 + 21/2/2005 - 11:43:50 + 1.04 + JR + ? + For solving of memory leaks + 0 + 0 + + +? + ? + Init + 4 + EndInit + +Init + + +long + Index + +long + Min + +long + Max + +long + Incr + + +long + Index + +long + Min + +long + Max + +long + Incr + + + +Init + + + + + + + +More + + + + + + + +Next + + + + 21/2/2005 - 11:43:50 + 21/2/2005 - 11:43:50 + 1.04 + ? + ? + Compute Node + 17 + 257 + +? + ? + EndInit + 5 + Init + +EndInit + + +long + Index + +long + Min + +long + Max + +long + Incr + + +long + Index + +long + Min + +long + Max + +long + Incr + + + +? + + 21/2/2005 - 11:43:50 + 21/2/2005 - 11:43:50 + 1.04 + ? + ? + Compute Node + 366 + 262 + + +Init + DoLoop + EndInit + DoLoop + + +Init + Index + EndInit + Index + + +Init + Min + EndInit + Min + + +Init + Max + EndInit + Max + + +Init + Incr + EndInit + Incr + + +EndInit + DoLoop + Init + DoLoop + + + +GraphLoopMemory_1 + Init__Index + Init + Index + +3 + 0 + + +GraphLoopMemory_1 + Init__Min + Init + Min + +3 + 5 + + +GraphLoopMemory_1 + Init__Max + Init + Max + +3 + 100000 + + +GraphLoopMemory_1 + Init__Incr + Init + Incr + +3 + 1 + -- 2.39.2