octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to return to top level and release memory


From: Andy Adler
Subject: How to return to top level and release memory
Date: Fri, 29 Aug 2003 23:17:26 -0400 (EDT)

I've been spending some time cleaning up the octave sparse
matrix code. There were a number of cases where the inverse
of sparse(zeros(2)) would cause a seg fault.

When correcting the issue, I decided that it didn't make
sense to try to continue if the matrix was singular, because:
1) the SuperLU libraries don't provide any help, and
2) returning a full matrix containing NaN, when the user
is trying to save memory using sparse probably won't work.

Currently, when I detect a singular sparse matrix, I throw
an error, using the following

 error("sparse: %s", str); octave_throw_bad_alloc ();

QUESTION:

Is there a proper way to get out of a deeply nested function,
(freeing memory on the way), and back to the interpreter?

Thanks

Andy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]