Re: fits_read_table corrupting something?

From: John E. Davis <davis_at_email.domain.hidden>
Date: Thu, 24 Jan 2008 12:02:36 -0500
[Cc'd to isis-users]

>The log file is going to be super-huge.  So, before I try to ftp you such a
>large file, let me ask whether this will actually give you all the data you
>need, and also whether there is a better way to do this.  (E.g., I

The strace output shows that it was unable to start a subprocess
because there was no memory available:

  clone(child_stack=0, ...) = -1 ENOMEM (Cannot allocate memory)

As far as determining what is taking up the memory goes, you might try
typing `who' at the isis prompt.  For something more complex use
`printvars(0)', where printvars is defined below.  Good luck, --John

define getvars()
{
   if (_NARGS == 0)
     usage ("%s(u);  %% u=0: slang vars;  u=1: intrin vars;", _function_name);

   variable mask = ();
   if (mask == 1) mask = 4; else mask = 8;

   variable list = {};
   foreach (_get_namespaces ())
     {
	variable ns = ();
	foreach (_apropos (ns, ".*", mask))
	  {
	     variable varname = ();
	     varname = strcat (ns, "->", varname);
	     variable ref = __get_reference (varname);
	     if (__is_initialized (ref))
	       {
		  variable v = _at_email.domain.hidden		  variable type = typeof (v);
		  variable str;
		  if (type != Array_Type)
		    print (v, &str);
		  else
		    str = string (v);
		  
		  list_append (list, sprintf ("%s = %s", varname, str));
		  continue;
	       }
	     
	     list_append (list, sprintf ("%s: not initialized", varname));
	  }
     }
   return list;
}

define printvars ()
{
   if (_NARGS == 0)
     usage ("%s(u);  %% u=0: slang vars;  u=1: intrin vars;", _function_name);
   
   variable mask = ();
   foreach (getvars (mask))
     {
	variable str = ();
	() = fprintf (stdout, "%s\n", str);
     }
}

   
----
You received this message because you are
subscribed to the isis-users list.
To unsubscribe, send a message to
isis-users-request_at_email.domain.hiddenwith the first line of the message as:
unsubscribe
Received on Thu Jan 24 2008 - 12:02:44 EST

This archive was generated by hypermail 2.2.0 : Thu Jan 24 2008 - 12:59:25 EST