Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
c0d3523c
Commit
c0d3523c
authored
Jul 13, 2020
by
Alessio Netti
Browse files
Analytics: fix to unit cache management
parent
13723cef
Changes
1
Hide whitespace changes
Inline
Side-by-side
analytics/includes/OperatorTemplate.h
View file @
c0d3523c
...
@@ -397,8 +397,9 @@ public:
...
@@ -397,8 +397,9 @@ public:
}
}
if
(
_unitCache
->
size
()
>=
_unitCacheLimit
)
{
if
(
_unitCache
->
size
()
>=
_unitCacheLimit
)
{
U_Ptr
oldest
=
_insertionLUT
->
begin
()
->
second
;
auto
oldest
=
_insertionLUT
->
begin
();
_unitCache
->
erase
(
oldest
->
getName
());
_unitCache
->
erase
(
oldest
->
second
->
getName
());
_insertionLUT
->
erase
(
oldest
->
first
);
}
}
_unitCache
->
insert
(
make_pair
(
unit
->
getName
(),
unit
));
_unitCache
->
insert
(
make_pair
(
unit
->
getName
(),
unit
));
// The template unit must never be deleted, even if the cache is full; therefore, we omit its entry from
// The template unit must never be deleted, even if the cache is full; therefore, we omit its entry from
...
...
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