function i4vec_memory_test ( n_log )

%*****************************************************************************80
%
%% i4vec_memory_test() declares and uses an I4VEC of size N.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 June 2009
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N_LOG, the logarithm base 2 of N.
%
  n = 2^n_log;

  fprintf ( 1, '  %4d  %12d', n_log, n );

  tic;
  cpu_time1 = cputime;

  i4vec = zeros ( n, 1 );

  i4vec = round ( 2.0 * rand ( n, 1 ) );

  average = ( sum ( i4vec(1:n) ) ) / n;

  cpu_time2 = cputime;
  real_diff = toc;

  cpu_diff = cpu_time2 - cpu_time1;

  fprintf ( 1, '  %4.2f  %10e  %10e\n', average, cpu_diff, real_diff );

  return
end

