<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:8px"><div class="" style=""><span class="" style="">Prezados colegas da lista, estava tentando rodar este exemplo quando tive problema de alocação de memória, alguém poderia me ajudar a resolver?</span></div><div style="color: rgb(0, 0, 0); font-size: 8px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span class="" style=""><br class="" style=""></span></div><div style="color: rgb(0, 0, 0); font-size: 8px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal; background-color: transparent;" class=""><span class="" style="">Att,</span></div><div class="" style=""></div><div class="" style=""> </div><div class="" style=""><span
style="font-weight:bold;font-style:italic;" class="">Ari Clecius Alves de Lima</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">Engenheiro Químico</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">Me. Engenharia Civil</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">(085)88412345</span><br style="font-weight:bold;font-style:italic;" class=""><span style="font-weight:bold;font-style:italic;" class="">(085)33669042</span></div><div style="color: rgb(0, 0, 0); font-size: 8px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; background-color: transparent;" class=""><span style="font-weight:bold;font-style:italic;" class=""><br class="" style=""></span></div><div style="color:
rgb(0, 0, 0); font-size: 8px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; background-color: transparent;" class=""><span style="font-weight:bold;font-style:italic;" class="">#CMR</span></div><div style="color: rgb(0, 0, 0); font-size: 8px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; background-color: transparent;" class=""><span style="font-weight:bold;font-style:italic;" class=""><br class="" style=""></span></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">processador: Intel(R) Core(TM) i3 CPU M380 @2.53GHz</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Memória instalada(RAM): 4,00 GB (utilizável:2,93)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class=""
style="">Sistema oeracional de 32 Bits</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><br class="" style=""></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">R version 3.1.1 (2014-07-10) -- "Sock it to Me"</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Copyright (C) 2014 The R Foundation for Statistical Computing</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Platform: i386-w64-mingw32/i386 (32-bit)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><br class="" style=""></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">N <- 100000000</i></b></div><div style="background-color: transparent;"
class=""><b class="" style=""><i class="" style="">x <- runif(N)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">y <- runif(N)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">ok <- sum(x^2 + y^2 < 1)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">mc.pi <- 4 * ok / N</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">sprintf("pi = %.6lf\n", mc.pi)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><br class="" style=""></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">#1ª tentativa</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><br
class="" style=""></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">>N <- 100000000</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">>x <- runif(N)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> y <- runif(N)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error: cannot allocate vector of size 762.9 Mb</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">In addition: Warning messages:</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">1: In runif(N) : Reached total allocation of 1535Mb: see help(memory.size)</i></b></div><div style="background-color: transparent;" class=""><b class=""
style=""><i class="" style="">2: In runif(N) : Reached total allocation of 1535Mb: see help(memory.size)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">3: In runif(N) : Reached total allocation of 1535Mb: see help(memory.size)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">4: In runif(N) : Reached total allocation of 1535Mb: see help(memory.size)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> ok <- sum(x^2 + y^2 < 1)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error: cannot allocate vector of size 762.9 Mb</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">In addition: Warning messages:</i></b></div><div style="background-color: transparent;"
class=""><b class="" style=""><i class="" style="">1: Reached total allocation of 1535Mb: see help(memory.size) </i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">2: Reached total allocation of 1535Mb: see help(memory.size) </i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">3: Reached total allocation of 1535Mb: see help(memory.size) </i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">4: Reached total allocation of 1535Mb: see help(memory.size) </i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> mc.pi <- 4 * ok / N</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error: object 'ok' not found</i></b></div><div style="background-color:
transparent;" class=""><b class="" style=""><i class="" style="">> sprintf("pi = %.6lf\n", mc.pi)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error in sprintf("pi = %.6lf\n", mc.pi) : object 'mc.pi' not found</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><br class="" style=""></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">memory.size(2900)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><br class="" style=""></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">2ª tentativa</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> N <- 100000000</i></b></div><div style="background-color:
transparent;" class=""><b class="" style=""><i class="" style="">> x <- runif(N)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error: cannot allocate vector of size 762.9 Mb</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> y <- runif(N)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error: cannot allocate vector of size 762.9 Mb</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> ok <- sum(x^2 + y^2 < 1)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error: cannot allocate vector of size 762.9 Mb</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> mc.pi <- 4 * ok /
N</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error: object 'ok' not found</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">> sprintf("pi = %.6lf\n", mc.pi)</i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style=""><span class="" style=""></span></i></b></div><div style="background-color: transparent;" class=""><b class="" style=""><i class="" style="">Error in sprintf("pi = %.6lf\n", mc.pi) : object 'mc.pi' not found</i></b></div></div></body></html>