View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Largest memory block available (All platforms)

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

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

Largest memory block available (All platforms)

by

Manu Raghavan (view profile)

 

03 Nov 2009 (Updated )

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

Keith (view profile)

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.

Comment only
Updates
01 Sep 2016 1.0.0.1

Updated license

Contact us