function y=test_malloc_and_free(n); % callocates n^2 bytes and returns sum

x=rand(n);
y=sum(sum(x));

