Code covered by the BSD License  

Highlights from
Largest memory block available (All platforms)

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 2.19 KB File ID: #25725

Largest memory block available (All platforms)

by

 

Find the largest contiguous memory block available for array allocation on all platforms.

| Watch this File

File Information
Description

>> largestmemblock

Maximum contiguous block is approximately:
 (Accurate to 95% of real memory value)
             833019 KB
                813 MB

% More accurate value
>> largestmemblock([],0.9999)

Maximum contiguous block is approximately:
 (Accurate to 95% of real memory value)
             835717 KB
                816 MB

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
14 Mar 2013 Keith

On my machine, allocating these huge matrices within the largestmemblock function takes ~15 seconds, where it is practically instant in the workspace. If you replace:

A = zeros(round(B), 1, 'uint8');

with:
evalin('base',sprintf('XMEMBLOCKLARGEX = zeros(%i,1,''uint8''); clear XMEMBLOCKLARGEX;',round(B)));

it runs much, much faster.

Contact us