XMLWordPrintable

Details

    • Sub-task
    • Resolution: Invalid
    • Not Evaluated
    • 4.8.0
    • Qt Script
    • None

    Description

      This function is tied to the JavaScriptCore back-end.

      V8 has a similar function, AdjustAmountOfExternalAllocatedMemory(). The difference is that it can be used to record a decrease in externally allocated memory, and that the information is retained between garbage collection runs:

         * Adjusts the amount of registered external memory.  Used to give
         * V8 an indication of the amount of externally allocated memory
         * that is kept alive by JavaScript objects.  V8 uses this to decide
         * when to perform global garbage collections.  Registering
         * externally allocated memory will trigger global garbage
         * collections more often than otherwise in an attempt to garbage
         * collect the JavaScript objects keeping the externally allocated
         * memory alive.
      

      This philosophy is different from JavaScriptCore's (from Collector.cpp):

          // Our frequency of garbage collection tries to balance memory use against speed
          // by collecting based on the number of newly created values. However, for values
          // that hold on to a great deal of memory that's not in the form of other JS values,
          // that is not good enough - in some cases a lot of those objects can pile up and
          // use crazy amounts of memory without a GC happening. So we track these extra
          // memory costs. Only unusually large objects are noted, and we only keep track
          // of this extra cost until the next GC. In garbage collected languages, most values
          // are either very short lived temporaries, or have extremely long lifetimes. So
          // if a large value survives one garbage collection, there is not much point to
          // collecting more frequently as long as it stays alive.
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kenthans Kent Hansen (Inactive)
            kenthans Kent Hansen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes