Hi, In both R 2.13 and the SVN trunk, I observe odd behaviour with the --max-vsize command-line argument:
1. passing a largeish value (about 260M or greater) makes mem.limits() report NA for the vsize limit; gc() continues to report a value... 2. ...but that value (and the actual limit) is wrong by a factor of 8. I attach a patch for issue 2, lightly tested. I believe that fixing issue 1 involves changing the return convention of do_memlimits -- not returning a specialized integer vector, but a more general numeric; I wasn't confident to do that.
>From 933ab0cfca4657eba217edc99094fd509223e657 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes <cs...@cantab.net> Date: Thu, 21 Jul 2011 14:40:34 +0100 Subject: [PATCH] src/main/memory.c: set R_MaxVSize when assigning to vsfac Fixes --max-vsize command-line option (previously generated a limit too great by a factor of 8 on my machines) --- src/main/memory.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main/memory.c b/src/main/memory.c index f514ffd..46b5d44 100644 --- a/src/main/memory.c +++ b/src/main/memory.c @@ -1877,7 +1877,7 @@ void attribute_hidden InitMemory() #endif vsfac = sizeof(VECREC); R_VSize = (((R_VSize + 1)/ vsfac)); - + R_SetMaxVSize(R_MaxVSize); UNMARK_NODE(&UnmarkedNodeTemplate); for (i = 0; i < NUM_NODE_CLASSES; i++) { -- 1.7.5.4
Please let me know if there's anything else I can do. Best, Christophe
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel