Re: Memory allocation for individual method or function (Java)
Date: November 28, 2019 12:28AM
No there is not a way to specifically do that. The Java Virtual Machine uses the same memory space for the whole Java program.
To see what is using the most memory in your program, you could use a Java profiler, that is a program that will spy on your virtual machine and tell you what is using the most memory. Then maybe it can help you to find where the memory problem comes from and you can try to optimize how you use the memory in your program.