►
From YouTube: OMR Architecture Meeting 20220217
Description
Agenda:
* Compiler memory leak discussion [ @kevindean12 ]
A
Welcome
everyone
to
the
february
17th
omar
architecture
meeting.
Today
we
have
one
topic
and
it's
a
compiler
topic,
so
kevin
dean
will
be
talking
about
a
compiler
memory
leak
that
he
and
his
team
have
discovered
and
would
like
some
some
deeper
insights
on
so
I'll
turn
it
over
to
kevin
to
to
take
us
through
it.
C
B
So
the
context
here,
as
darrell
said,
is
we
encountered
a
memory
leak
while
working
on
a
project
that
is
beginning
to
consume
the
omr
code
for
the
first
time,
so
the
project.
B
A
we
call
it
a
kind
of
a
generic
non-java
front-end,
so
it's
actually
built
on
kind
of
an
earlier
version
of
some
of
the
same
code
that
omr
originally
came
from.
B
So
what
we've
been
doing
is
progressively
replacing
older
compiler
back-end
components
that
we
originally
had
in
our
project
with
omr
code
and,
of
course,
with
our
our
kind
of
project,
specific
extensions
where,
where
we
need
them
so
in
the
in
the
process
of
doing
that
recently,
we've
began.
B
We
began
consuming
the
the
memory
related
files,
so
this
includes
tr
memory,
but
also
kind
of
all
of
the
other
memory
memory
management
related
files
from
the
emv
directory,
so
we're
using
region
for
the
first
time
in
in
other,
in
various
components
throughout
our
code,
for
the
sake
of
what
we're
talking
about
here
today,
that
that
includes
the
the
node
pool,
to
some
extent
the
compilation
and
the
cfg.
B
Those
will
be
the
kind
of
the
relevant
ones
all
right.
So
let's
show
you
what
we've
what
we
encountered.
So
we
we
recently
changed
over
from
an
older
version
of
the
node
pool,
more
or
less
as
it
used
as
it
once
existed
in
the
omr
project
itself,
and
it
still
existed
for
up
till
recently
in
our
code
base
and
began
using
the
the
node
pool
that
is
found
in
omr.
B
Now
that
the
original
node
pool
that
we
were
switching
away
from
was
using
a
cs2
data
structure,
the
table
of
that
was
backed
by
a
tr
allocator.
We
still
see
some
of
these
floating
around
in
some
places,
but
for
the
most
part,
they're
kind
of
on
their
on
their
way
out.
I
think
they're
deprecated,
that
that
is
now
been
replaced
in
the
new
node
pool
with
a
with
a
tr
region.
B
B
If
folks
are
interested
but
we're
going
to
spend
we'll
start
kind
of
on
case
one
and
come
back
to
it,
but
the
story
is
similar
in
which
we
replaced
some
older
allocators
in
the
cfg
with
the
region.
B
So
what
we
encountered
was
that,
after
starting
our
regular
regression
test,
so
this
is
after
after
replacing
the
node
pool
after
starting
regular
regression
tests
within
a
few
hours
we
were
encountering.
B
You
know
out
of
memory
related
crashes,
so
we
so
we
started
investigating
this
and
ran
ran
our
some
small
kind
of
unit
tests
under
valgrind,
and
so
what
we
have
here
is
a
is
a
stack
trace
from
valgrind
that
is
kind
of
representative
of
a
bunch
of
similar
stack
traces
that
we
that
we
were
seeing
related
to
the
node
pool.
So
what
we're
looking
at
is
you
know?
B
First
beneath
this
there
would
be
some
front-end
kind
of
il-gen
code
that
results
in
the
creation
of
a
node
in
the
process
of
of
creating
that
node.
The
node
pool
is
asked
to
allocate
this
region
is
a
is
a
member
of
that
node
pool
which
we'll
look
at
in
a
little
more
detail
shortly
and
so
that
that
region
then
is
asked
to
allocate
segments
that,
then,
you
know
kind
of
follows
down
the
the
the
chain
of
the
of
the
segment
provider.
B
So
we
have
the
system
segment
provider
that
then
asks
the
raw
allocator
to
allocate.
And
finally,
what
we
end
up
with
is
is
a
malik,
so
what
this
valgrind's
result
is
indicating,
of
course,
is
that
we
have
memory
that's
being
allocated
under
the
auspices
of
this
of
this
particular
region.
B
That's
resulting
that
that's
being
malicked
at
the
end
of
the
day,
and
then
there
is
no
corresponding
free.
That
memory
is
getting
lost.
So
then
the
question
was
what
why
is
that
happening?
So
we
took
a
look
at
that.
B
Okay,
so
the
node
pool
exists-
and
this
is
this-
is,
as
the
code
exists
in
in
omr,
so
the
node
pool
is
being
allocated
and
stored
as
a
as
a
pointer
in
the
compilation.
So
we
have
an
instance
of
the
compilation.
That's
that's
created,
and
eventually
you
know
it
will
go
out
of
scope
and
have
its
destructor
called.
B
But
the
node
pool
instance
is
a
is
a
pointer
to
node
pool
inside
of
that
compilation.
So
we
can
see
down
at
the
bottom
here
a
snippet
of
showing
how
the
node
pool
is
is
allocated
within
the
compilation.
B
We
have
this
compilation
nodes,
member
of
the
compilation
class
that
allocates
a
new
node
pool.
I
didn't
show
the
the
node
pool
constructor
here,
but
the
gist
of
it
is
that
so
the
node
pool
has
this.
This
region,
member
called
the
node
region
and
you'll
notice.
It's
not
a
it's,
not
a
reference
right.
B
So
this
is
this
node
region
is,
is
created
in
the
constructor
of
the
node
pool,
using
using
the
heat
memory
region
as
the
as
the
prototype
to
it,
so
as
the
parameter
to
the
node
to
the
regions
constructor,
but
it's
not
itself
a
reference
to
to
any
other
region.
So
this
is
its
own
region
all
right.
B
So
so
so
then,
when
the
when
the
node
pool
is
allocating
nodes,
they're
they're,
coming
from
they're
using
this
this
region
member
to
allocate
them
like,
we
saw
in
that
the
stack
trace
from
belgrand.
B
So
useful,
maybe
to
as
kind
of
a
refresher
of
what
the
region
destructor
does.
So
when
the
region
has
allocated
allocated
segments,
it's
keeping
a
list
of
these
segments
that
it
that
it
owns
so
to
speak,
and
when
it,
when
the
region
is
destroyed
it
will
it
will
release
each
of
these
segments
in
turn,
so
it'll
walk
through
its
list
of
segments
and
ask
its
segment
provider
to
release
them
in
this
case.
B
What
that
means
is
this:
the
system
segment
provider
is
going
to
call
the
de-allocate
function
from
the
raw
allocator
and
that's
basically
a
wrapper
around
free,
so
those
maleks
that
we
saw
in
the
in
the
valgrind
stack
trace
when
a
region
goes
out
of
scope.
Normally
what
should
happen
is
those
are
those
have
a
corresponding
free
called
from
that
gets
called
eventually
from
this
destructor
call
from
the
region.
B
So
in
this
in
this
case
that
that
wasn't
happening,
so
I've
already
begun
to
indicate
why
that
was
not
happening,
but
just
to
sort
of
explain
that
in
more
detail.
So
what
happens
is
that
the
node
pool.
B
So
because
that's
the
case
when
the,
when
the
compilation
goes
out
of
scope
and
has
its
destructor
called
this,
here
is
what
the
compilation
destructor
looks
like
right:
it's
just
a
sort
of
a
default
constructor,
a
destructor
rather,
and
that
mean
what
that
means
right-
is
that
the
the
this
compilation
destructor
will,
by
its
default
behavior
called
the
destructors
of
any
of
its
non-pointer
members
of
the
compilation
class.
But
it's
not
gonna.
It's
not
gonna!
Do
that
for
pointer
members.
B
So,
as
a
result,
the
compilation
destructor
doesn't
call
the
the
node
pools
destructor
right.
What
happens
then,
of
course,
is
that
the
the
node
pool,
having
not
had
its
destructor
called,
doesn't
doesn't
call
the
destructor
of
its
of
its
node
region
so
that
that
region,
member
of
the
node
pool,
doesn't
get
it
never
has
a
destructor
called
so
the
memory
that
was
allocated
using
that
region
never
gets
cleaned
up,
which
leads
to
our
memory
leak.
B
Okay,
so
I'm
gonna
pause
here
I
I
do
have
so
we
can.
We
can
talk
more
about
the
the
cfg
case,
which
is
which
is
quite
similar
actually
in
in
terms
of
what
it
looks
like,
but
I
want
to
sort
of
stop
at
that
point
and
let
people
kind
of
jump
in
with
questions
or
other
other
kinds
of
discussion
related
to
this
right.
So
the.
E
It
looks
like
you
just
skip
one
slide:
oh
and
this
one
sorry
yeah
you're
right.
B
Okay,
thank
you
so
before
I
do
that
before
I
stop.
Let
me
finish
finish
my
story.
So,
as
james
pointed
out,
I
skipped
right
through
this
slide,
so
the.
B
The
question
that
this
kind
of
raises
right
is
is:
do
we
want
this?
B
The
solution
that
we
came
up
with
so
the
the
solution
is
as
as
kind
of
implied
by
what
I
talked
about
before,
to
be
a
task
that
that
a
front
end,
that's
consuming
omr
should
implement
that,
and
if
not
you
know,
how
do
we
want
to
document
that
or
that
that
kind
of
thing,
so
what
we
did
to
to
clean
this
up
right
is
that
the
destructor
for
the
node
pool
needs
to
be
called
inside
the
compilation
destructor.
B
So
if
we
do
that
explicitly
because
it's
a
pointer
member
that
will
then
trigger
the
destruction
of
the
node
pool's
region,
so
we.
B
Actually
do
anything
to
the
node
with
the
node
pools
destructor,
we
don't
have
to
write
any
any
any
explicit
destructor
for
the
node
pool.
It's
it's
default.
Compilation
compiler,
provided
destructor
will
do
that
we'll
we'll
do
what
we
need
it
to
do,
which
is
to
call
the
destructor
of
that
node
region
and
then,
as
we
as
we
saw
right
when
that,
when
that
node
regions
destructor
is
called
it
will,
it
will
free
up
the
memory
that
it
that
it
had
allocated
and
and
that
that
clears
up
the
memory
leak.
B
So
so
this
sort
of
provides
the
solution
to
at
least
as
far
as
our
front-end's
use
of
the
code
is
concerned
to
the
the
leak
come
that's
coming
from
the
node
pools
region.
So
to
the
question
that
is
sort
of
at
the
top
of
the
slide.
Should
the
solution
be
a
task
at
the
front?
You
know
the
corresponding
sort
of
question.
Is
that
right?
B
If
that's
the,
if
that's
the
case-
and
it
may
be,
one
thing
to
note-
is
that
there
may
be
other
some
other
class
members
that
have
similar
sort
of
situations.
So
I
mentioned
that
we
have
a
second
case
involving
the
cfg
that
was
that
looks
pretty
similar
to
this
one
kind
of
the
same
thing.
B
There
may
be
others,
but
these
are
the
ones
that
we've
that
we've
encountered
so
far
and
in
each
case,
so
here
you
know
that
we're
showing
this
code
at
the
omr
level,
omr
compilation,
but
of
course
the
this
isn't
what
exists
currently
in
the
omr
code.
So
this
would
either
have
to
be
implemented
at
the
omr
level
or
in
each
case
right.
A
project
extension
would
have
to
take
care
of
performing
these
destructor
calls
or
or
whatever
other
similar
solutions.
Someone
might
want
to
cope
with.
B
Okay.
So
with
that,
I
will
get
back
to
what
I
had
erroneously
said
before,
which
is
that
I
will
stop
there
and
see
if
there's
any
questions
or
thoughts
that
people
have.
D
Hi
this
is
erwin,
so
the
the
the
way
this
whole
memory
infrastructure
was
designed,
I
think,
was
very
much
in
a
like.
I
think,
with
how
java
was
doing
things
yeah
and
so
the
the
idea
there
was
that
you
would
have.
You
know
these
little
compilations
of
the
different
methods
you're
trying
to
compile
dynamically,
and
so
the
way
it
worked
was
that
you
didn't
need
to
worry
about
destructing,
the
node
pool.
D
If
we
haven't
ever
used
it,
but
let's
just
say
we
did,
because
the
system
segment
provider
would
go
out
of
scope
at
the
end
of
what's
known
as
like
a
compilation
unit,
and
then
for
our
next
compilation.
Another
system
segment
provider
would
be
instantiated,
and
so
because
of
that,
when
the
system
segment
provider
went
out
of
scope,
it
would
free
all
the
segments
and
you
wouldn't
have
a
memory
leak,
and
I
mean
that
still
happens
in
walmart
too.
D
If
you
look
at
the
destructor
of
the
system
segment
provider,
it
doesn't
do
anything
explicitly,
but
it
has
an
underscore
sets
or
sorry
underscore
segments,
a
member
which
is
an
std
set,
and
so
when
the
system
segment
provider
goes
on
a
scope,
it
would
destroy
that
now
it
it
that's
just
the
way
it
was
designed
based
on
how
java
was
doing
things,
and
that,
I
think,
was
the
assumption
of
how
all
this
worked.
D
Now.
The
question
you're
asking
essentially,
which
is
you
know,
should
that
be
how
omr
does
it
for
generic
languages
is
something
that
I
think
has
never
been
that's
something
that
should
be
considered
sure.
D
Like
you
know,
it
should
should
the
should
a
consuming
project
be
responsible,
for
you
know
arranging
their
compilations
such
that
you
know
the
system
segment
provider
goes
out
of
scope
or,
as
devin
was
saying
offline
was
you
know,
should
it
be
expected
or
reasonable
to
assume
that
you
can
have
one
system
segment
provider
and
you
have
multiple
compilations
based
on
that
so
but
yeah
I
just
the
the
reason
for
the
the
way
things
are
is
because
of
that
mindset
of
a
system
segment
provider
would
be
there'd,
be
one
system
segment
provider
for
a
compilation
unit.
C
If
we
wanted
to
be
able
to
rely
on
on
the
system
segment
provider
to
clean
it
up
as
it
does
in
openg9,
we
would
have
to
modify
the
the
destructor
to
actually
free
those
segments.
C
D
C
Sort
of
thing,
I
guess
my
my
intuition
is
that
for
things
that
are
about
as
long-lived
as
the
compilation,
it's
going
to
be
a
lot
less
error-prone
to
just
free
all
the
segments
at
the
end,
then
to
make
sure
oh
did
we
call
this
one?
Did
we
call
that
one?
Oh,
we
forgot
this
one
and
then
you
know
this
will
happen
again.
B
And
so
so,
in
that
context
we
have
the
the
the
system
segment
provider.
Basically,
the
the
expectation
is
that
that
the
system
segment
provider
is
doing
it
lasts
for
for
one
compilation
and
then
is
replaced
with
it
with
another
one
so
that
it's
the
memory
is
getting
freed
in
between
each
compilation.
C
Yeah,
so
that's
that's
what
we
do
in
in
j9
and
I'm
that's
the
the
reason
why
we
haven't
encountered
this
this
leak.
As
far
as
I
can.
C
A
We
had,
I
think
we
had
a
discussion
at
some
point,
perhaps
as
part
of
the
our
earlier
discussions
almost
a
couple
of
years
ago
now
on
refactoring,
some
of
the
memory
allocator
infrastructure
in
the
compiler,
where
we
really
wanted
to
favor
more
that
approach,
where
you
know
destructors
wouldn't
be,
we
wouldn't
be
reliant
on
destructors
being
running.
We
would
really
just
sweep
the
memory
away
when
we,
when
we
were
done
with
it.
So
I
think
that
was
the
model
that
we
had
decided
we
wanted
to
go
to.
A
So
I
I
agree
with
what
with
what
devin's
saying
here
with
with
that
being
the
preferred
approach
and
solution
in
this
in
this
case
now,
having
said
that,
though,
if
that
is
what
we
want
to
do,
I
think
that
we
we
need
some
big
fat
documentation
somewhere
that
really
describes
you
know.
This
is
how
it
should
be,
if
you're,
if
you're,
implementing
something
that's
consuming
the
compiler
technology-
and
you
know
this
is
how
your
your
memory
segment
should
behave.
Per
compilation.
A
Now,
if
we
had
once,
if
you,
if
you
redesigned
it
so
that
you
would
have
one
segment
per
compilation,
would
that
solve
your
other
problem
with
the
with
the
cfg
or
segment
provider?
Do
you
mean
yes,.
B
Right,
yeah
yeah,
so
if
we
have
one
one
segment
provider
for
per
compilation,
you
know.
Interestingly,
I
think
I
I
had
I
toyed
around
with
that,
but
I
didn't.
I
didn't
know
at
the
time
that
that
was
you
know
how
things
were
handled
in
j9,
and
so
I
I
didn't
toy
around
with
it
enough,
probably
to
come
up
with
a
good
answer.
I
would
like
to
play
around
with
this
more
now,
knowing
that,
but
if
we
have,
if
we're
able
to
replace
the
system
segment
provider.
B
Yeah
because
it's
got
the
the
set
of
of
of
segments
which
would
obviously,
if
that's,
if
that's
getting
going
out
of
scope
and
getting
to
destroy
that,
should
clean
up
all
of
that.
All
that
memory.
F
B
C
I'll
just
want
to
repeat
that
if
you
had
been
doing
one
system
segment,
provider
per
per
compilation,
yeah.
C
And
that,
at
the
end
of
the
compilation,
the
system
segment
provider
went
out
of
scope.
At
the
moment,
the
omr
system
segment
provider
would
not
actually
release
the.
C
So
it's
it's
just
deciding
which
way
to
to
fix
that
memory
leak
and
if
we
think
that
we
should
put
that
logic
in
because
when,
when
that's
happening
in
j9,
it's
because
we
have
a
j9
specific
system
segment
provider
that
we
use.
Instead,
that.
C
And
it
would
be,
I
guess,
a
few
lines
of
code
to
make
the
omr
one
also
do
that,
but
you
would
not
have
have
stumbled
upon
that
solution.
B
C
B
More
sense
because
I
was
thinking
to
myself,
you
know
I
swear
that
I
had
tried,
like
making
sure
I
got
rid
of
the
system
segment
provider
each
time
between
the
compilations,
because
of
course
that's
that's
at
the
bottom
of
kind
of
that
memory
stack
or
almost
all
the
way
at
the
bottom,
but
yeah
that
makes
that
makes
more
sense.
If
there's
something
specific
going
on
in
j9.
To
have
that
happen,
then
that's.
Why
that's
why
I
wouldn't
have
seen
it
seen
that
as
a
solution
right
away.
G
G
D
C
So
it'll
destroy
this
set,
but
it
won't.
I
don't
think
it'll,
actually
free
the
backing
memory
of
the
segments
right,
there's
explicit
code
that
we
have
in
well
yeah.
But
that's
because
depends.
D
What's
in
the
set
in
j9,
it
does
things
using
the
it
doesn't
use,
and
I
think
j9
does
things
considerably
differently
when
it
when
it
allocates
like
it,
uses
the
segments.
D
C
The
segment
set
here
contains
memory
segment
and
so
tr
memory
segment
is
defined
in
omr
and
its
destructor
is
empty.
C
C
C
Right
but
anyway,
what
we
have
in
j9
is
a
loop.
That's
you
know,
like
maybe
a
few
lines,
long.
B
Yep
that
that
makes
sense,
so
I
think
the
probably
the
question
for
consuming
projects
is
more,
if
that's
the
preferred
way
of
doing
it,
which
makes
plenty
of
sense,
probably
to
or
to
have
some
kind
of
documentation
at
the
omr
level,
as
daryl
was
maybe
suggesting.
C
Yeah
and
for
it
to
be
implemented
at
the
omr
level,
because
I
do
think
it
sounds
like
like
jetbuilder-
is
susceptible
to
this
problem
at
the
moment.
G
C
I'm
not
sure
where
else
that
gets
called
well
like,
for
example,
here
when
we're
inserting
into
the
segment
set,
we
construct
a
tr
memory
segment
and
we
pass
that
into
insert,
which
I
presume
copies
it
and
then
we'll
destroy
the
temporary
in
that
way.
Right.
G
C
A
No,
I
was
just
going
to
say:
if
that's,
if
that's
the
resolution
here,
I
guess
we
should
find
the
code,
that's
in
the
corresponding
j9
segment
provider
and
and
lift
that
into.
A
D
I
don't
think
you
can
just
lift
that
code
because
they're,
it's
quite
different
in
j9,
but
it
it's
gonna
have
to
be
like
omar's
gonna
have
to
have
his
own
version
of
it,
but
it's
it's
still.
I
think
what
devin
said
like
maybe
three
or
four
lines,
because
in
in
in
j9
the
the
art
like
the
way
these
things
are
composed
is
different
than
omar.
That's
one
of
the
reasons
we
had
that
proposed
memory
changes
is
to
keep
things
consistent
and
the
destructor.
G
It's
just
looping
at
least
the
version,
the
code
I'm
looking
at,
which
could
be
older,
but
I
don't
think
this
changes
very
often
it's
just
a
loop
over
the
system
segments
and
calling
a
release
from
the
system
segment
allocator,
so
you're
right,
it's
not
quite
the
same,
but
it'll
be
pretty
close.
A
B
B
You
know
if
I,
if
I
have
any
trouble
figuring
out,
adapting
it
then
I
can
I'll
certainly
reach
out
to
somebody
one
of
you
guys,
but
but
I'd
be
happy
to
sort
of
take
that
on
as
a
something
I
can
contribute
here
and
then
you
know
we
can
test
test
it
test
it
out
at
our
level
and
confirm
that
that
we're
seeing
the
solution
we
expect
and
yeah.
A
B
Yeah,
I
don't
I
don't
know.
If
james
did,
you
want
to
bring
up
what
you
had
mentioned
about
the
the
cursor.
F
Yeah
sure
we
we
kind
of
completed
the
discussion
for
the
case,
one
now
yeah.
We
can
talk
another
case
it's
at
the
beginning.
We
have
a
similar
solution
for
this.
One.
B
Yeah,
let
me
I
can
share
this
screen
properly.
B
F
F
It's
again
somewhat
similar
memory
leaks,
definitely
lost
from
the
background.
This
case
is
happened
when
we
call
call
the
is
actually
invoked
by
the
compiler
method
and
calling
to
perform
optimization
and
from
the
stack
trees.
We
see
it's
go
back
to
cursor,
then.
Finally,
some
to
the
raw
allocator
again
my
lock
and
we
find
out
that
the
memory
it's
totally
lost
never
can
free.
F
That's
right.
Please.
B
Sure
so
so
one
thing
I'll
point
out
here,
james
just
to
not
make
you
have
to
repeat
repeat
too
much
for
this
part
is,
is
like
this.
This
story
here,
basically,
is,
is
similar
right
about
the
this.
The
the
the
road
here
leads
back
to
a
region
in
the
cfg.
Basically
is
the
brown
is
the
is
the
memory
leak
story
here
which,
in
the
end
kind
of
looks
the
same
as
the
as
the
node
pool
situation
right?
B
So
this
there's
a
region
in
the
cfg
that's
being
used
to
allocate
in
in
this
case,
what
we
find
is
so
we
have
this
type
def
vector
of
subgraph
node
pointers,
that's
backed
by
what
turns
out,
in
the
end,
to
be
this
structure
region
from
the
cfg
and
for
the
same
reason
as
the
node
pool
causes
a
leak
right.
This.
B
This
will
end
up
having
a
leak,
because
the
cfg
is
stored
as
a
pointer
inside
of
the
res
resolved
method,
symbol
which
is
stored
as
a
pointer
inside
of
the
compilation
again,
one
thing
that
that
james
discovered,
though,
was-
and
I
think,
had
a
question
about-
was
related
to
not
just
that
memory
leak
per
se,
but
also
to
the
use
of
of
the
cursor.
More
generally,
I
think
is
that
true
james.
B
So
yeah,
just
to
sort
of
this,
this
part
of
the
story
is
kind
of
the
same
as
what
we
saw
before
with
the
node
pool
right.
So,
in
the
end,
the
these
destructor
calls
could
be
done.
As
we've
talked
about.
B
We
can
probably
handle
this
with
the
system
segment
provider
changes
that
we
that
we
discussed,
but
there's
also
the
james,
had
worked
on
a
sort
of
another
work
around
and,
I
think,
had
a
question
about
some
of
the
the
way
the
cursor
is
doing
a
a
copy
so
james,
I
can
I'll
give
it
back
to
you.
There.
F
Oh
yeah,
thank
you
yeah.
What
are
we
concerned
about?
It
says
the
cursor
is
actually
provide
a
immutable
view
of
the
underlying
elements
and
to
achieve
that
it,
the
cursor
itself
is
actually
must
copy
the
elements
from
the
sub-node
list
listed
before,
and
it
is
of
course,
in
none,
adding
a
non-trivial
cost
for
this
one.
F
F
However,
what
if
we
can
directly
access
those
elements
inside
the
sub-node
list,
and
we,
if
we
are
sure
we
don't
modify
them,
then
functionally
looks
like
to
me
the
same
thing,
and
so
I
made
a
one
experimental
test
and.
F
Payments
and
check
the
results,
then
than
the
maverick
leaks
is
gone,
and
probably
we
can
save
some
additional
the
the
cost
of
the
copy.
And
but
the
thing
is,
this
is
experiment
experimental
test.
I
didn't
really
ensure
I'm
using
any
cloud
successor
to
ensure
the
elements
is
not
modified
or
whatever,
and
the
other
thing
is
we
have
to.
F
If
we
are
using
this
approach,
we
may
have
to
replace
the
cursor
or
get
rid
of
cursor
is
not
just
in
one
place
in
marketplaces
like
in
structure,
we
have
a
method,
initial
structure
and
there's
a
method.
I
think
it's
a
reset
structure,
something
like
that.
We
can
again
to
replace
the
cursor
and
a
few
other
places
possibly
to
use
this
approach.
F
So
we
we
show
this
alternative
solution
here,
just
for
further
discussion,
especially
in
front
of
experts
to
guide
us.
Is
that
reasonable
or
something
worth
of
thinking.
F
So
yeah,
that's
basically
what
we
did
using
the
directory
accessor
to
access
elements
of
the
region
structure,
but
not
using
the
cursor
to
make
a
copy
then
check
the
underlying
elements.
That's
an
alternative
solution.
C
So
one
is
that
I
think
this
is
kind
of
but
kind
of
not
covered
by
what
we
talked
about
in
the
in
the
other
case,
with
the
with
the
node
pool
in
that
that'll
prevent
these
things
from
outliving
the
compilation,
but
if
we
don't
want
them
to
you
know
it's
possible
that
they're
living
a
lot
longer
than
they
need
to
within
the
compilation,
and
that
could
be
you
know,
adding
up
to
you
know
a
lot
more
memory
usage
than
than
needed
depending
and
then
so
you
know,
there's
there's
avoiding
you
know
extra
copies,
which
I
guess
are
are
also
allocating
into
that
same
region.
C
C
And
then
you
know,
there's
also,
you
know,
maybe
we
want
to
just
you
know,
get
rid
of
some
of
these
things.
I've
been
trying
to
look
at
memory
usage
during
a
compilation
and
part
of
the
thing
is
that
tons
of
the
regions,
though,
that
we're
creating
and
some
of
the
methods
I'm
looking
at
are
well.
I.
C
And
now
I
don't
know
how
much
actual
memory
we
we
have
total
in
in
those
ones
yet,
but
you
know
if
it's,
if
it's
a
significant
amount,
then
that's
that's
a
a
separate
thing
where
you
know,
I
don't
think
any
of
these
are
needed
afterwards,
like
say
once
you
inline
some
other
body
into
wherever
it's
going.
C
Well,
you
know
it
doesn't
need
its
own
cfg
in
its
own
structure,
region
anymore.
We're
not
going
to
go.
Look
at
those
things.
C
I
don't
think
so.
There's
that
and
then
what
I'll
say
about
avoiding
copies
with
this
iterator
is
that
I
think
it's
fine
to
have
such
an
iterator,
but
that
I
would
be
pretty
wary
of
getting
rid
of
the
one
that
makes
a
copy
and
blanket
replacing
it,
because
it
does
make
a
copy.
F
That's
that's
fine
for
me,
because
yeah
cause,
I
have
only
limited
understanding
of
the
code
base
and
only
read
the
code.
We
we
get
in
touch
quite
a
few
files,
but
not
much
right.
F
We
don't
have
a
high
level
view
of
the
omr
code
here
at
the
moment
just
case
by
case
we
encounter
something.
We
take
a
look
yeah.
That's
it.
B
Yeah,
in
fact,
the
once
we
had
cleaned
up
these
these
two,
so
so
the
the
the
this
in
the
second
case
right
it
was,
there
were
a
variety
of
leaks
that
were
all
kind
of
related
coming
coming
from
this
this
region,
so
the
cursor
was
what
example
was
one
of
them,
but
then
there
were
kind
of
others
that
were
where
this
region
was
being
used
for
other
other
allocations,
but
but
once
we
you
know
once
that
once
that's
cleaned
up,
then
it
it
takes
care
of
all
of
all
of
those
leaks.
B
So
between
this
and
the
node
pool
that
was
the
those
were
the
sources
of
all
of
the
new.
All
the
memory
leaks
that
we
were
seeing.
F
So
yeah
this
one
is
like
inside
the
perform
optimization.
It's
a
recursive
call
and
another
case
is
somewhat
similar
a
again
a
recursive
call
when
we
initialize
or
reset
it.
So
we
are
creating
a
huge
amount
of
memories
leaks
once
we
use
the
solution
or
yeah.
So
then
we
don't
see
the
memory
leaks.
B
Okay,
so
I
think
we
have
a,
I
mean
it
sounds
like
there's
a
there's,
a
useful
way
forward
to
try
adapting
this,
the
j9
segment.
B
Cleanup
to
the
omr
system
segment
provider
so
that
we
can,
you
know,
give
that
a
shot
and
see
if
that
that
takes
care
of
the
issue,
and
probably
we'll
have
to
do
some
adapting
on
our
end.
Also
to
make
sure
that
that
the
system
segment
provider
is,
you
know,
created
once
and
going
out
of
scope
for
each
compilation.
But.
B
Yeah,
I
think
that's
that's
that
that
makes
sense
yeah.
Thank
you.
A
Okay,
any
other
comments
for
kevin
or
james
on
this
topic.
A
Okay,
all
right,
so
this
was
the
only
topic
this
week.
So
thank
you,
everyone
for
your
participation
and
good
to
see
that
we
had
a,
I
think,
a
successful
resolution
of
this
problem.
So
thank
you
and
we'll
compete
again
in
two
weeks.