<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>So "automatic garbage collection" is a lie? <br>
</p>
<div class="moz-cite-prefix">On 11/25/20 6:40 AM, Tim Cutts wrote:<br>
</div>
<blockquote type="cite"
cite="mid:F6E97D17-6293-4AFB-92F5-BB605C42880B@sanger.ac.uk">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Except of course, you do really. Java applications can end up
with huge memory leaks because the programmers really need to
understand the mechanism when objects get moved from Eden and
Survivor space into Tenured space.
<div class=""><br class="">
</div>
<div class="">
<div>Tenured space never decreases, so every object which ends
up there is allocated memory for the life of the process. If
that was actually an ephemeral object, tough, you’ve lost the
memory.</div>
<div><br class="">
</div>
<div>So ideally, the programmer needs to understand the size of
their pile of ephemeral objects and make sure the
Eden/Survivor spaces are large enough, otherwise they will
have a memory leak. If they make the ephemeral spaces too
large, though, garbage collection takes more time and
performance decreases, so it’s a balance.</div>
<div><br class="">
</div>
<div>I’m not sure you can ever actually really get rid of the
need to understand memory allocation… you just push the
problem around!</div>
<div><br class="">
</div>
<div>Tim</div>
<div><br class="">
</div>
<div>
<blockquote type="cite" class="">
<div class="">On 24 Nov 2020, at 18:32, Prentice Bisbal via
Beowulf <<a href="mailto:beowulf@beowulf.org" class=""
moz-do-not-send="true">beowulf@beowulf.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px; font-style:
normal; font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none; float: none; display: inline
!important;" class="">Also, with Java, you don't have to
worry about low-level issues like freeing and allocating
memory and doing pointer arithmetic. Not having to worry
about those low-level issues allows a student to focus
more on the programming concepts. I knew I screw up
dereferencing pointers A LOT when learning C and C++</span><br
style="caret-color: rgb(0, 0, 0); font-family:
Helvetica; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none;" class="">
</div>
</blockquote>
</div>
<br class="">
</div>
-- The Wellcome Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose
registered office is 215 Euston Road, London, NW1 2BE. </blockquote>
<pre class="moz-signature" cols="72">--
Prentice Bisbal
Lead Software Engineer
Research Computing
Princeton Plasma Physics Laboratory
<a class="moz-txt-link-freetext" href="http://www.pppl.gov">http://www.pppl.gov</a></pre>
</body>
</html>