Message: Memory Leak or Not? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Memory Leak or Not? 

Forum: Run Management
Date: 04 Feb, 2016
From: Doris <Doris>

Dear Geant4 People,

    During the compilation of our simulation program, the val-grind memory leakage check tool found three memory leakage problems, which were about the creation of new variables by some Geant4 10.1.2 functions. I wonder if

1) These variables are deleted by Geant4 at the end, so users do not have to worry about,

2) users should delete them by themselves (then how?), or

3) the assigned memory space gets simply lost.

Your help would be greatly appreciated. I attached the warning messages from the val-grind below.


--- Start of Error Messages ---

Case 1)
1,320 (200 direct, 1,120 indirect) bytes in 1 blocks are definitely lost

/tmp/valgrind-3.8.1/coregrind/m_replacemalloc/vg_replace_malloc.c:298 	operator new(unsigned long)

/home/Linux_x86_64/opt/lib/ G4RunMessenger::G4RunMessenger(G4RunManager*)

/home/Linux_x86_64/opt/lib/ G4RunManager::G4RunManager()

/home/simulation/src/ RunManager::RunManager()

Case 2)
1,014 (200 direct, 814 indirect) bytes in 1 blocks are definitely lost

/tmp/valgrind-3.8.1/coregrind/m_replacemalloc/vg_replace_malloc.c:298 operator new(unsigned long)

/home/Linux_x86_64/opt/lib/ G4OpticalPhysicsMessenger::G4OpticalPhysicsMessenger(G4OpticalPhysics*)

/home/Linux_x86_64/opt/lib/ G4OpticalPhysics::G4OpticalPhysics(int, G4String const&)

/home/simulation/src/ SimulationModule::initialize()

Case 3)
2,928 bytes in 61 blocks are definitely lost

/tmp/valgrind-3.8.1/coregrind/m_replacemalloc/vg_replace_malloc.c:298 operator new(unsigned long)

/home/Linux_x86_64/opt/lib/ G4ElectroNuclearCrossSection::GetElementCrossSection(G4DynamicParticle const*, int, G4Material const*)

/home/Linux_x86_64/opt/lib/ G4CrossSectionDataStore::GetCrossSection(G4DynamicParticle const*, G4Element const*, G4Material const*)

/home/Linux_x86_64/opt/lib/ G4CrossSectionDataStore::GetCrossSection(G4DynamicParticle const*, G4Material const*)

/home/Linux_x86_64/opt/lib/ G4HadronicProcess::GetMeanFreePath(G4Track const&, double, G4ForceCondition*)

/home/Linux_x86_64/opt/lib/ G4VDiscreteProcess::PostStepGetPhysicalInteractionLength(G4Track const&, double, G4ForceCondition*)

/home/Linux_x86_64/opt/lib/ G4SteppingManager::DefinePhysicalStepLength()

/home/Linux_x86_64/opt/lib/ G4SteppingManager::Stepping()

/home/Linux_x86_64/opt/lib/ G4TrackingManager::ProcessOneTrack(G4Track*)

/home/Linux_x86_64/opt/lib/ G4EventManager::DoProcessing(G4Event*)

/home/simulation/src/ RunManager::processEvent(int)

--- End of Error Messages ---

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Agree: Re: Memory Leak or Not?   (Gumplinger Peter - 05 Feb, 2016)
(_ Ok: Re: Memory Leak or Not?   (Doris - 06 Feb, 2016)
 Add Message Add Message
to: "Memory Leak or Not?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]