Re: [R] Encodebuf? yet another memory question

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 10 Mar 2005 - 03:49:23 EST

On Wed, 9 Mar 2005, Tim Howard wrote:

> Hi all,
> I was surprised to see this memory error:
>
> Error in scan(Cn.minex13, nlines = 2, quiet = TRUE) :
> Could not allocate memory for Encodebuf
>> memory.size(max=TRUE)
> [1] 256843776
>> memory.size(FALSE)
> [1] 180144528
>> memory.limit()
> [1] 2147483648
>
>
> I don't have any objects named 'Encodebuf' and help and the R site
> search turn up no matches for this word.

Try the source code, specifically that for R_AllocStringBuffer.

> As memory.size and memory.limit indicate, I'm way below my limit (but,
> I grant that maybe windows won't give R any more memory...). In my
> next run, I'll ask to scan fewer lines, but I thought it worth asking
> the group if this 'Encodebuf' error meant anything different than the
> standard "can't allocate xxxxx bytes" message. (btw, if you are confused
> that scanning only 2 lines would max out my memory... I'm scanning two
> long lines from 36 different connections so it does add up).

Yes, in that it is a direct call to malloc so no gc() takes place. In any case, you have run out of memory and this is perfectly possible if they are long lines since scan reads a line at a time into memory.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 10 03:57:50 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:42 EST