On Fri, 11 Apr 2008, Søren Højsgaard wrote:
Dear list I have two (trivial) memory-questions related to a call with .C:
On Windows, I presume from past questions from yourself. The answers really are completely Windows-specific, so please do remember to tell us your OS!
If I allocate memory with R_alloc in a C-program (called with .C), will that memory "be taken from" the "available memory pool" (of a maximum of 4gb?) which R can allocate? (This is the impression I get from "Writing R extensions".)
Yes. Same for Calloc.
If instead I use malloc; will that memory then be taken from the available pool for R? Or does that happen without having an impact on R's "available memory pool"?
From a different pool, but from the same address space. There is no morevirtual memory that R does not have access too, so you would just be setting up in competition.
-- Brian D. Ripley, [EMAIL PROTECTED] 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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.