[Rd] R-1.0.0 on alpha/osf1 memory glitch (PR#490)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
20 Mar 2000 00:49:00 +0100


Thomas J Vogels <tov@ece.cmu.edu> writes:

> Hi,
> 
> I just tried this on an AIX computer (4.3.2, also gcc + f77, R-1.0.0).
> The same "error" comes up -- xmalloc complains.  This is somewhat
> cosmetic as the data is fine so it may not be very high on the
> priority list.
> Anyways, let me know if I can help debug this--I don't know whether
> you have easy access to DEC or AIX boxes.  But with a dysfunctional
> gdb I'd need a hint about where this might happen.
> Regards,
>   -tom
...
> [snip]
> >     xmalloc: out of virtual memory
> 
> [snip]

Hmm. In system.c we have

    case SA_SAVE:
	if(runLast) R_dot_Last();
	if(R_DirtyImage) R_SaveGlobalEnv();
#ifdef HAVE_LIBREADLINE
#ifdef HAVE_READLINE_HISTORY_H
	if(R_Interactive && UsingReadline)
	    stifle_history(R_HistorySize);
	write_history(R_HistoryFile);
#endif
#endif
	break;


This looks wrong to me since write_history is getting called even if
!R_Interactive and !UsingReadline, in which case I don't think there
*is* a history to write and I'd suspect that anything could happen...
Could you try making that

        if(R_Interactive && UsingReadline) {
            stifle_history(R_HistorySize);
            write_history(R_HistoryFile);
	}

 
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._