[Rd] allocation of large matrix failing
Simon Urbanek
simon.urbanek at r-project.org
Wed Jul 13 00:36:15 CEST 2005
James,
On Jul 12, 2005, at 5:05 PM, James Bullard wrote:
> Hello, this is probably something silly which I am doing, but I
> cannot understand why this allocation is not happening.
I suspect it's something else - the code you sent us works without
problems for me:
> .C("foo",as.integer(333559))
numHits:333559
before allocation...
allocated oligo list...
entering looop...
[[1]]
[1] 333559
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 162348 4.4 350000 9.4 350000 9.4
Vcells 60528 0.5 1453055 11.1 1562032 12.0
I have also tested it with 100-times larger vector and it works as well:
> .C("foo",as.integer(33355900))
numHits:33355900
before allocation...
allocated oligo list...
entering looop...
[[1]]
[1] 33355900
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 162526 4.4 350000 9.4 350000 9.4
Vcells 60536 0.5 120333512 918.1 150162111 1145.7
This was on both Debian Linux and OS X, but that shouldn't really
matter I suppose... (and I don't see why it should fail). If you
overdo it with the size you can get "Error: cannot allocate vector of
size xxx", but it won't hang, either.
Cheers,
Simon
More information about the R-devel
mailing list