<div dir="ltr">Hi,<div>I am just curious about the heap memory consumption of Virtual Threads.</div><div><br></div><div><img src="cid:ii_l78eeyy80" alt="image.png" width="562" height="281"><br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div><a href="https://gist.githubusercontent.com/andysundar/6401e20fee5674ae47fd94778d37f752/raw/c95905c45cbae47cbb66c3fe46e48f13dcaf19a9/VirtualThreadScaleExample.java">Code Link Here</a><br></div><div dir="ltr"><br></div><div>In the above code I am switching the thread factory in line number 10. I was just trying to analyze performance statistics and what I discovered is that virtual thread consumes a significant amount of heap memory (may be due to the continuation objects put into heap memory) with respect to platform thread. </div><div><br></div><div><ol><li>Do we need to increase the size of heap memory if we are using virtual thread? <br></li><li>What do you mean by "virtual threads are lightweight" ? </li></ol></div><div><br></div><div><img src="cid:ii_l78f8xec1" alt="image.png" width="562" height="317"><br></div><div><br></div><div>Will be eagerly waiting for your reply. </div><div><br></div><div dir="ltr">Regards;<br>Anindya Bandopadhyay<br><a href="http://www.linkedin.com/in/anindyabandopadhyay" target="_blank"><img width="96" height="96" src="https://ci3.googleusercontent.com/mail-sig/AIorK4wc7vkRjiByaujRe_sUyynf3O1RAXCYCZ_SVWU_iA6uy5G3XlVt5h7gI-RWITqVnl9eiHFMQgY"></a><br></div></div></div></div></div>