Maximum possible array leak in standalone application

2 次查看(过去 30 天)
Hi all,
I'm working with Matlab 2009b (32 bit) on Windows 10 OS (64 bit). When I run my code I've not memory problems, since:
Maximum possible array: 2046 MB (2.145e+009 bytes) Memory available for all arrays: 3110 MB (3.262e+009 bytes) * Memory used by MATLAB: 713 MB (7.474e+008 bytes) Physical Memory (RAM): 32640 MB (3.423e+010 bytes)
Once Standalone executable is created (by using deploytool), I get out of memory error (running not from sript but from created .exe): Maximum possible array: 429 MB (4.502e+008 bytes) Memory available for all arrays: 1252 MB (1.312e+009 bytes) * Memory used by MATLAB: 596 MB (6.252e+008 bytes) Physical Memory (RAM): 32640 MB (3.423e+010 bytes)
  • Limited by contiguous virtual address space available. Limited by virtual address space available.
Why are Maximum possible array and Memory available for all arrays reduced?
I can't switch to a 64 bit Matlab; so, any suggest?
Thanks in advance.
Pasquale

回答(1 个)

Philip Borghesani
Philip Borghesani 2016-5-27
The application version of matlab does a few things to help increase the available memory and largest block size.
  1. Link the exe with the /LARGEADDRESSAWARE linker option alowing the application to access 4gb of memory when run on a 64 bit os. This can also be done after the fact with the editbin utility.
  2. Rebase the exe and all dependent dlls using the editbin.exe utility with the /REBASE option.
  3. Matlab implements a memory shield to prevent dlls that have not been rebased from loading in the largest contiguous memory block on startup.
Implementing these fixes in your own exe will improve the memory available to the application I believe they are listed in order of most effective and ease to implement. I am not an expert on the MATLAB compiler so i am sorry I have no suggestion on the exact way to implement these suggestions.

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by