[Rd] Segmentation fault linked to memory? (PR#929)

J.C.Rougier@durham.ac.uk J.C.Rougier@durham.ac.uk
Mon, 30 Apr 2001 15:34:06 +0200 (MET DST)


Hi Everyone,

The following rather extreme claim on memory causes a
segmentation fault on my installation:

fred <- matrix(1:1200, 20, 60)

littleOP <- function(x, y)
{
  z <- as.vector(x) %*% t(as.vector(y))
  dim(z) <- c(dim(x), dim(y))
  z
}

littleOP(fred, fred)                 # this is OK
littleOP(littleOP(fred, fred), fred) # whoops! Segmentation fault

What's a bit strange is that if I do the outer product the
`old-fashioned' way then I get the more usual error message:

> (fred %o% fred) %o% fred
Error: cannot allocate vector of size 2555696 Kb

Cheers, Jonathan.

--please do not edit the information below--

Version:
 platform = sparc-sun-solaris2.7
 arch = sparc
 os = solaris2.7
 system = sparc, solaris2.7
 status = 
 major = 1
 minor = 2.1
 year = 2001
 month = 01
 day = 15
 language = R

Search Path:
 .GlobalEnv, Autoloads, package:base

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._