My machine has 4Gb of memory under WinXP Pro. Re-reading R for Windows FAQ 2.7 I discovered that I can use editbin to add the "/LARGEADDRESSAWARE" tag in the header without re-compiling, so that is what I did. I also check that it worked using dumpbin. I then edited my Boot.ini file to add the /3GB switch. Then I went to my R.0.0.1 patched that I modified as above and checked memory limit:> memory.limit(NA)[1] 1073741824 This is usual default.> memory.limit(3*1024)NULL> memory.limit(4*1024)Error in memory.size(size) : cannot decrease memory limit It seems to work, since I am able to allocate 3Gb of memory, but not 4Gb (though the error message I get isn't very helpful since I am clearly not trying to decrease the memory limit). However, this does not seem a good way to check that my LARGEADDRESSAWARE version of R is working properly, because when I do the same memory.limit operations on 2.0.1.0 dev that I downloaded this morning I get the same results, without having made the program LARGEADDRESSAWARE Also, although trying to allocate 4Gb of memory does produce an error, I can allocate 3.9Gb, which seems hard to beleive because the OS is supposed to reserve 1Gb.> memory.limit(3.9*1024)NULL> memory.limit(NA)[1] 4187593113>So, finally, here are my questions, in order of interest: 1) Once I have made my version of R LARGEADDRESSAWARE, how do I best verify that all is well? 2) Why was I able to increase the memory.limit to 3.9Gb on the new version of R.0.1.0 that I did not make LARGEADDRESSAWARE? 3) Is there any side-effect to making a program LARGEADDRESSAWARE? I don't want to sound lazy, but for the benefit of those who don't have Visual Studio, why not make the distributed binary LARGEADDRESSAWARE? Thanks in advance for any insight. Roger J. Bos
roger bos wrote:> My machine has 4Gb of memory under WinXP Pro. Re-reading R for > Windows FAQ 2.7 I discovered that I can use editbin to add the > "/LARGEADDRESSAWARE" tag in the header without re-compiling, so that > is what I did. I also check that it worked using dumpbin. I then > edited my Boot.ini file to add the /3GB switch. Then I went to my > R.0.0.1 patched that I modified as above and checked memory limit: > > >>memory.limit(NA) > > [1] 1073741824 > > This is usual default. > > >>memory.limit(3*1024) > > NULL > >>memory.limit(4*1024)memory.limit(4*1024-1) should work (you get an overflow with 4*1024).> Error in memory.size(size) : cannot decrease memory limit > > It seems to work, since I am able to allocate 3Gb of memory, but not > 4Gb (though the error message I get isn't very helpful since I am > clearly not trying to decrease the memory limit). > > However, this does not seem a good way to check that my > LARGEADDRESSAWARE version of R is working properly, because when I do > the same memory.limit operations on 2.0.1.0 dev that I downloaded this > morning I get the same results, without having made the program > LARGEADDRESSAWARE > > Also, although trying to allocate 4Gb of memory does produce an error, > I can allocate 3.9Gb, which seems hard to beleive because the OS is > supposed to reserve 1Gb.Yes, but R does have the permission now to request 3.9 Gb, even if it does not get it from the OS.> >>memory.limit(3.9*1024) > > NULL > >>memory.limit(NA) > > [1] 4187593113 > > > So, finally, here are my questions, in order of interest: > 1) Once I have made my version of R LARGEADDRESSAWARE, how do I best > verify that all is well?If you don't trust the FAQ, you can try it out by assigning some big objects and look what happens..... if it crashes, you will see...> 2) Why was I able to increase the memory.limit to 3.9Gb on the new > version of R.0.1.0 that I did not make LARGEADDRESSAWARE?I think you won't get that many memory from the OS, but R is now allowed to ask the OS in order to get it.> 3) Is there any side-effect to making a program LARGEADDRESSAWARE? I > don't want to sound lazy, but for the benefit of those who don't have > Visual Studio, why not make the distributed binary LARGEADDRESSAWARE?I guess because of license issues. Is it permitted to distribute such a software (modified by Visual Studio) given both the Visual Studio license and the GPL from R??? Uwe Ligges> Thanks in advance for any insight. > > Roger J. Bos > > ______________________________________________ > R-help at 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
You forgot that 32-bit machines do integer operation mod 2^32. So you actually asked for a memory limit of 0, which was a decrease. We do recommend that you use the command-line flag, e.g. in the rw-FAQ. % rterm --max-mem-size=4096M WARNING: --max-mem-size=4096`M': too large and ignored would have told you the error. You don't seem to appreciate the difference between `limit' and `allocate': please read the help page for memory.limit with a modicum of care. Once you appreciate that you have seriously misread the page, things will become a lot clearer. On Tue, 4 Jan 2005, roger bos wrote:> My machine has 4Gb of memory under WinXP Pro. Re-reading R for > Windows FAQ 2.7 I discovered that I can use editbin to add the > "/LARGEADDRESSAWARE" tag in the header without re-compiling, so that > is what I did. I also check that it worked using dumpbin. I then > edited my Boot.ini file to add the /3GB switch. Then I went to my > R.0.0.1 patched that I modified as above and checked memory limit: > >> memory.limit(NA) > [1] 1073741824 > > This is usual default. > >> memory.limit(3*1024) > NULL >> memory.limit(4*1024) > Error in memory.size(size) : cannot decrease memory limit > > It seems to work, since I am able to allocate 3Gb of memory, but not > 4Gb (though the error message I get isn't very helpful since I am > clearly not trying to decrease the memory limit). > > However, this does not seem a good way to check that my > LARGEADDRESSAWARE version of R is working properly, because when I do > the same memory.limit operations on 2.0.1.0 dev that I downloaded this > morning I get the same results, without having made the program > LARGEADDRESSAWARE > > Also, although trying to allocate 4Gb of memory does produce an error, > I can allocate 3.9Gb, which seems hard to beleive because the OS is > supposed to reserve 1Gb. > >> memory.limit(3.9*1024) > NULL >> memory.limit(NA) > [1] 4187593113 >> > > So, finally, here are my questions, in order of interest: > 1) Once I have made my version of R LARGEADDRESSAWARE, how do I best > verify that all is well? > 2) Why was I able to increase the memory.limit to 3.9Gb on the new > version of R.0.1.0 that I did not make LARGEADDRESSAWARE? > 3) Is there any side-effect to making a program LARGEADDRESSAWARE? I > don't want to sound lazy, but for the benefit of those who don't have > Visual Studio, why not make the distributed binary LARGEADDRESSAWARE?The maintainer does not have it. Simple! -- Brian D. Ripley, ripley at 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