<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    BLOCK_CACHE IS enabled by default in 5.1.1.3.<br>
    #define MZ_USE_PLACES (the default as of 5.1.1.3) enables block
    cache (see top of gc2/vm.c file).<br>
    <br>
    If you have a pre 5.1.1 version or have places disabled, then my
    block cache patch won't be of any help.<br>
    <br>
    Kevin<br>
    <br>
    <br>
    <br>
    On 04/23/2011 01:09 AM, Nevo wrote:
    <blockquote
      cite="mid:BANLkTinMnc7A11=oNFisbF3Rnud3qf20kw@mail.gmail.com"
      type="cite">hi Kevin:<br>
      &nbsp; Your patch seems requiring "USE_BLOCK_CACHE" to be enabled.
      Sorry for my lack of knowledge into Racket's memory management
      component, how can I safely enable that because I cannot find its
      reference in configure or Makefile.in? Thanks!<br>
      <br>
      Nevo<br>
      <br>
      <div class="gmail_quote">On 23 April 2011 14:27, Nevo <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:sakur.deagod@gmail.com">sakur.deagod@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          hi Robby<br>
          &nbsp; Just back from out of town, sorry for the late reply.<br>
          &nbsp; No. This doesn't help at all, still got low-memory killing
          on my ipad. Actually, my own test is all based on "#lang
          racket/base". I'll try Kevin's patch to see any difference.
          I've also tried to throttle the max_pages_in_heap to allow
          around 25MB pages to use, it will soon throw "out of memory"
          exception and abort after a couple of GC cycles.<br>
          <font color="#888888">
            <br>
            Nevo</font>
          <div>
            <div class="h5"><br>
              <br>
              <div class="gmail_quote">On 22 April 2011 19:08, Robby
                Findler <span dir="ltr">&lt;<a moz-do-not-send="true"
                    href="mailto:robby@eecs.northwestern.edu"
                    target="_blank">robby@eecs.northwestern.edu</a>&gt;</span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  This program:<br>
                  <br>
                  &nbsp;#lang racket/base<br>
                  &nbsp;(printf "hi\n")<br>
                  <br>
                  uses a lot less memory than this one:<br>
                  <br>
                  &nbsp;#lang racket<br>
                  &nbsp;(printf "hi\n")<br>
                  <br>
                  Does that help at all?<br>
                  <br>
                  Robby<br>
                  <div>
                    <div><br>
                      On Fri, Apr 22, 2011 at 12:09 AM, Nevo &lt;<a
                        moz-do-not-send="true"
                        href="mailto:sakur.deagod@gmail.com"
                        target="_blank">sakur.deagod@gmail.com</a>&gt;
                      wrote:<br>
                      &gt; hi<br>
                      &gt; &nbsp;&nbsp;My attempt on porting Racket interpreter to
                      iOS has been for a while and<br>
                      &gt; I've been able to run interpreter on both iOS
                      device as well iOS simulator.<br>
                      &gt; Right now, it runs perfectly on iOS
                      simulator, but lack of satisfaction on<br>
                      &gt; device. The reason is for those devices like
                      iPad/iPhone or Android, the<br>
                      &gt; memory for standalone application is always
                      constrained, and even a single<br>
                      &gt; "hello world" evaluation would easily put the
                      whole app runtime to death,<br>
                      &gt; per my test. In particular, here I've got
                      some commented out "printf" code<br>
                      &gt; compiled in for newgc.c, and trying to load a
                      simple "hello world" racket<br>
                      &gt; file to evaluate results in more than 30MB
                      memory in use (reported by gc).<br>
                      &gt; This is nothing for a desktop, but will kill
                      itself easily in iOS which<br>
                      &gt; usually requires the average memory
                      allocation will be less than 20MB. So<br>
                      &gt; I'm asking if there's some known compiling or
                      runtime configuration which I<br>
                      &gt; may not know to reduce memory usage, at least
                      keep average allocation<br>
                      &gt; acceptable for those memory constrained
                      devices. Thanks for your suggests<br>
                      &gt; here!<br>
                      &gt; Nevo<br>
                    </div>
                  </div>
                  &gt; _________________________________________________<br>
                  &gt; &nbsp;For list-related administrative tasks:<br>
                  &gt; &nbsp;<a moz-do-not-send="true"
                    href="http://lists.racket-lang.org/listinfo/dev"
                    target="_blank">http://lists.racket-lang.org/listinfo/dev</a><br>
                  &gt;<br>
                </blockquote>
              </div>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>