[Rd] Memory Leak in OS X versions? (PR#6903)

dvanbrunt at well-wired.com dvanbrunt at well-wired.com
Fri May 21 15:24:40 CEST 2004

Full_Name: David L. Van Brunt
Version: 1.8-1.9 beta
OS: OS X 10.3
Submission from: (NULL) (

As posted on R-Help (after which another user replicated the problem):
This is the conclusion from a prior thread ([R] " cannot allocate vector of
length 1072693248") which ended with no other answer but that there must be
a problem in the OS X version of R, or in the compile of the source on OS X.

I’ve posted code and data here:

If you setwd() into the directory that is made, then “source()” the “.R”
file, it should run fine on Windows but crash on any machine with OS X
(Panther) giving: “Error in as.vector(data) : cannot allocate vector of
length 1073741824” after a few iterations of the loop.

I've repeated this on a Powerbook G4 with 500 MB of RAM, an iMac with 128M
of RAM, and a Dual 2GHz G5 with 1.5 Gig of RAM. Have used the Raqua, the
Frameworks installation, and a fresh compile of the source using Fink in the
X11 implementation. No matter the machine or the version (1.8x through 1.9,
OS X or Unix X11), I get the same result.

Thanks to Andy Liaw for helping me tune the code this far.

I'm stumped. Would love to hear others' experience with this, and if they
can reproduce the problem elsewhere.

David L. Van Brunt, Ph.D.
Outlier Consulting & Development
mailto: <ocd at well-wired.com>

More information about the R-devel mailing list