How to share cache memory in Java Multithreading?
<p>I am running multiple threads in Java.</p>

<p>I read a large file that is about 5 GB and share this file among multiple threads.</p>

<p>So I read the file and then call multiple threads.</p>

<p>As far as I know, Java threads reads a shared variable and stores it in its own cache.</p>

<p>So for my case, if I have 5 threads, the program will take upto 25 GB memory.</p>

<p>However, I want my threads not to store a shared variable in its own cache, but to share it without storing it.</p>

<p>Is there a way to do so?</p>

<p>thanks in advance.</p>