Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cmsos
worksuite
Commits
b2c23fd2
Commit
b2c23fd2
authored
Sep 22, 2021
by
Dainius Simelevicius
Browse files
references
#264
: elastic::timestream should release memory blocks when it is disabled
parent
bf5b21d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
elastic/timestream/include/elastic/timestream/version.h
View file @
b2c23fd2
// $Id$
/*************************************************************************
* XDAQ Components for Distributed Data Acquisition *
* Copyright (C) 2000-201
8
, CERN. *
* Copyright (C) 2000-20
2
1, CERN. *
* All rights reserved. *
* Authors:L. Orsini, P. Roberts, D. Simelevicius *
* *
...
...
@@ -18,7 +16,7 @@
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_MAJOR 2
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_MINOR 4
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_PATCH
0
#define WORKSUITE_ELASTICTIMESTREAM_VERSION_PATCH
1
// If any previous versions available E.g. #define WORKSUITE_ELASTICTIMESTREAM_PREVIOUS_VERSIONS ""
#undef WORKSUITE_ELASTICTIMESTREAM_PREVIOUS_VERSIONS
...
...
elastic/timestream/src/common/Application.cc
View file @
b2c23fd2
...
...
@@ -400,12 +400,17 @@ void elastic::timestream::Application::timeExpired(toolbox::task::TimerEvent& e)
void
elastic
::
timestream
::
Application
::
onMessage
(
toolbox
::
mem
::
Reference
*
ref
,
xdata
::
Properties
&
plist
)
{
// some protections
if
(
enable_
==
false
)
if
(
ref
==
0
)
{
return
;
}
if
(
ref
==
0
)
// some protections
if
(
enable_
==
false
)
{
ref
->
release
();
return
;
}
std
::
string
qname
=
plist
.
getProperty
(
"urn:xmas-flashlist:name"
);
...
...
@@ -426,7 +431,6 @@ void elastic::timestream::Application::onMessage(toolbox::mem::Reference* ref, x
return
;
}
toolbox
::
mem
::
Reference
*
localRef
;
if
(
spoolerPool_
->
isHighThresholdExceeded
())
...
...
@@ -482,7 +486,6 @@ void elastic::timestream::Application::onMessage(toolbox::mem::Reference* ref, x
return
;
}
elastic
::
timestream
::
Event
*
ep
=
new
elastic
::
timestream
::
Event
(
plist
,
localRef
);
toolbox
::
task
::
EventReference
e
(
ep
);
...
...
@@ -507,12 +510,10 @@ void elastic::timestream::Application::onMessage(toolbox::mem::Reference* ref, x
}
catch
(
toolbox
::
task
::
exception
::
InternalError
&
e
)
{
// we do not know what happen to this reference, therefore we cannot free , this reference can be considered lost
//localRef->release();
localRef
->
release
();
statistics_
[
qname
].
lossQueueFullCounter
++
;
std
::
stringstream
msg
;
msg
<<
"Failed to dispatch event report for flashlist '"
<<
qname
<<
"'
, a memory reference can be lost
"
;
std
::
stringstream
msg
;
msg
<<
"Failed to dispatch event report for flashlist '"
<<
qname
<<
"'"
;
XCEPT_DECLARE_NESTED
(
elastic
::
timestream
::
exception
::
Exception
,
q
,
msg
.
str
(),
e
);
this
->
notifyQualified
(
"fatal"
,
q
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment