How to solve 'Out of memory' error?

14 visualizaciones (últimos 30 días)
Yoojung Moon
Yoojung Moon el 4 de En. de 2023
Respondida: sreepathy el 17 de Nov. de 2025 a las 4:16
I faced the 'Out of memory' error while design and anlayze an designed antenna using matlab's 'PCB Antenna Designer'.
This is my antenna design.
And When i do Analysis, i faced that error.
This is my memory.
I already do the solution 'Increase JAVA Heap memory'. But it didn't work.
I have attached my files to this article.
please help...............
What can i do to solve this problem?
Thank you..

Respuesta aceptada

Walter Roberson
Walter Roberson el 4 de En. de 2023
Increasing Java Heap Memory will not help in that kind of situation. Increased Java Heap memory helps only in situations such as the editor not being able to handle large files, or perhaps the Variable Browser having problems with a large array. Or, in some cases, creating large variables at the Java level such as if you used the older XML parser that built java objects.
The Java Heap memory is reserved and taken away from general memory available for computation. Unless you have an overhead (such as editor) task that is eating Java memory, you should not increase the Java Heap, and might even consider reducing it.
You might want to consider enabling the setting that prevents allocation of arrays larger than a particular size. Doing so will not enable your code to run, but it might fail in a slightly more controlled manner. The setting is mostly there to prevent allocating huge arrays that require the operating system to start swapping to disk (which is very slow.)
Chances are that you will not be able to run your desired code without either reducing resolution (some how), or possibly reducing number of iterations, or by adding more RAM. Increasing Virtual Memory (swapping to disk) might perhaps allow the code to run, but if so then it would likely be rather slow.
  1 comentario
Yoojung Moon
Yoojung Moon el 4 de En. de 2023
Editada: Yoojung Moon el 4 de En. de 2023
Thanks for the reply and the good informations.
Have a Good day :-)

Iniciar sesión para comentar.

Más respuestas (1)

sreepathy
sreepathy el 17 de Nov. de 2025 a las 4:16
When MATLAB displays an OutOfMemoryError while analyzing a PCB antenna design, it clearly indicates that the simulation requires more memory than is available to MATLAB’s execution environment. When we encounter this error, we will first attempt to increase the Java Heap Memory. However, this also affects the amount of memory available for the MATLAB desktop and UI-related tasks. Generally, for such cases, the memory used for numerical processing comes directly from the system RAM, not the Java heap.
To overcome this issue, you can try to simplify your antenna geometry or reduce the mesh density in the analysis settings. Complex or highly meshed designs can quickly exhaust available memory. Check whether you are running a 64-bit version of MATLAB, as the 32-bit version can only address up to 2–4 GB of RAM regardless of system capacity. If you are already using the 64-bit version, close unnecessary applications and ensure MATLAB has access to as much physical memory as possible.
Finally, you can use MATLAB’s command-line workflow (instead of the PCB Antenna Designer app) to manually control meshing and analysis steps, providing more flexibility in memory management.

Categorías

Más información sobre Array Catalog en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by