qsort

From: Michael Barlage (barlage AT atmo.arizona.edu)
Date: Thu Jun 16 2005 - 10:17:57 MDT


Just like to know if anyone has noticed any memory issues while using
qsort. I'm sorting large arrays in a loop and deleting variables along the
way to save memory but it seems that everytime qsort is called, temp
variables are created and then not deleted(that's my diagnosis anyway).
Run this test program and top. It eventually sucks up my machine memory:

begin
 do i = 0,200
  print((/i/))
  x1D = new((/4000000/),integer)
  x1D = 1
  qsort(x1D)
  delete(x1D)
 end do
end

Also, I think the example on qsort is incorrect. 'qsort_x = qsort(x)' will
not work.

http://www.ncl.ucar.edu/Document/Functions/Built-in/qsort.shtml

==================================
Michael Barlage
Institute of Atmospheric Physics
University of Arizona
(520) 626-3552
barlage@atmo.arizona.edu
==================================

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Mon Jun 20 2005 - 08:43:13 MDT