Thanks to Duncan, Hadley and Henrik.

Duncan, I used Rprof and could pinpoint the critical routine that was
doing the memory crash.

Henrik, you got it right: the culprit was a big matrix of integers,
but where some of its fields are filled with -Inf and Inf. This matrix
is global, it's used only once, it does not consume too much memory,
and it should be harmless, but...

Hadley, your link to memory allocation and management helped to
identify the problem. I did a very stupid think, I added some debug in
the critical routine that duplicated it at each iteration of a loop...
So that big matrix with integers and Infs and -Infs was being copied
several times, killing memory needlessly.

Thanks for all the help.

"I got 99 problems but you won't be one"

Alberto Monteiro

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to