Commit 64005bef authored by Frank Winklmeier's avatar Frank Winklmeier Committed by Atlas Nightlybuild
Browse files

Merge branch 'leak_checker' into 'master'

fix EventLoop LeakCheck unit test ATLASG-1610

See merge request atlas/athena!48168

(cherry picked from commit c843ec0d)

a7f67239 fix EventLoop LeakCheck unit test ATLASG-1610
parent 066aaef0
......@@ -19,7 +19,12 @@ namespace EL {
// Allocate the requested amount of memory.
if( m_leakBytes > 0 ) {
char* lostPointer = new char[ m_leakBytes ];
// This needs to be `volatile` and zeroed out to ensure the memory
// really gets allocated by the operating system. Without `volatile`
// the compiler is essentially allowed to optimize away the write,
// and the operating system isn't required to allocate it if it isn't
// written to.
volatile char* lostPointer = new volatile char[ m_leakBytes ];
for( int i = 0; i < m_leakBytes; ++i ) {
*lostPointer = 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment