Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: set mem


From   Andy Choi <[email protected]>
To   [email protected]
Subject   Re: st: set mem
Date   Wed, 8 Mar 2006 23:31:38 -0800 (PST)

I ran this ado file.  Its still unclear how I could
obtain the information it should provide such as the
maximum allowable memory.  After the do file, I tried
the following commands:

. memtest
Maximum value of memory allowed by OS is invalid
syntax
. memtest r(osmem_m)
Maximum value of memory allowed by OS is invalid
syntax
. memtest r(memory)
Maximum value of memory allowed by OS is invalid
syntax


--- Fred Wolfe <[email protected]> wrote:

> At 04:42 PM 3/8/2006, you wrote:
> >I have found discrepancies on the maximum memory
> >allowed using the set mem command despite equal
> >amounts of RAM on various computers. Is there is a
> >direct correlation between RAM on your computer and
> >the memory allocated using the set mem command?
> >
> >Any recommendations on how to maximize set mem?
> 
> 
> I have a program that tests how much memory is
> available. I have not sent 
> it SSC. It is posted below.
> 
> I have a few other programs, though not necessarily
> the most modern that do 
> some useful things for memory.
> 
> One is called -resetmem- that allows you to reset
> memory without clearing 
> out current memory. It also will reduce memory
> automatically so as not to 
> waste memory. If there is some interest in it I can
> send it to Kit to post 
> on the archives.
> 
> Bill Gould, who knows so many things, thinks
> programs like this are a bad 
> idea because if something goes wrong you can lose
> your data. But that's 
> true with many programs. I've never had a problem.
> Caveat ...
> 
> Fred
> 
> *! memtest.ado v1.0.2 fw 3/30/04 determines maximum
> allowable memory
> *! and current memory. Allowable value in mb is
> returned in r(osmem_m)
> *! keywords: memory
> program define memtest, rclass
>     version 8.2
>     preserve
>     clear
>     qui query memory
>     local oldmem = `r(memory)'
>     local memtest = 2000
>     while `memtest' > 100 {
>     cap set mem `memtest'm
>     if _rc == 0 {
>        di in green "Maximum value of memory allowed
> by OS is " in 
> yellow"`memtest'm"
>        continue, break
>     }
>     local memtest = `memtest' - 100
>     }
>     return scalar osmem_m = `memtest'
>     set mem `oldmem'k
>     restore
> end
> 
> 
> 
> Fred Wolfe
> National Data Bank for Rheumatic Diseases
> Wichita, Kansas
> Tel (316) 263-2125     Fax (316) 263-0761
> [email protected]
> 
> 
> *
> *   For searches and help try:
> *  
> http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index