3 Replies Latest reply on May 1, 2013 1:48 PM by Michael J.A. Smith

    How do I reclaim "uncategorized" memory?

    gabriel montagné



      I'm trying to reduce the memory footprint of an application.

      I've noticed that half of the memory consumed by the app is "Uncategorized" and, even though "Actionscript Objects" memory goes up and down, the "Uncategorized" memory seems to never be released.


      What is it?  I suspect it must be related to strings being created because it goes up faster on my rigs where I dispatch lots of events.


      Is there a way to claim it back?




        • 1. Re: How do I reclaim "uncategorized" memory?
          Michael J.A. Smith Adobe Employee

          Uncategorized memory includes objects that are allocated internally by Flash Player - there's no direct link to your ActionScript objects (i.e. you can't allocate this memory directly), but it might be allocated as a consequence of what you do from ActionScript. We're working on improving the memory categorisation to break this down further, but for now, here are some possible big-ticket items that would fall under Uncategorized:


          - Buffers used for sound and video playback

          - XML data

          - memory used by Stage3D (not your textures and meshes, etc, but the internal data structures used by Stage3D and OpenGL/DirectX).

          - memory used by Telemetry (this will be broken out into a separate category, in the next version of Scout).


          If you turn off all the settings for new sessions (except for Basic Telemetry), the Telemetry overhead should be negligibly small compared to everything else, so you can ignore this last point.


          "Uncategorized" also includes all the little internal data structures that Flash Player uses. There are lots of these, but they're typically very small, and there's not a lot you can do about it (at that stage, you're getting down to the implementation details of Flash Player).


          btw, Strings will be included under ActionScript objects (even if they're internal to Flash Player), because they use the same memory allocator.

          1 person found this helpful
          • 2. Re: How do I reclaim "uncategorized" memory?
            gabriel montagné Level 1

            Thanks for your reply.  That's good to know.


            I fear that some of this "uncategorized" memory might also include  memory unavailable because of fragmentation.  My app is a large Flex app and as such sometimes allocates and deallocates thousands of object (including a lot of strings when deserializing data) on single frames..   I hope I'm wrong.  Am I?  If so, does Scout represent fragmented memory in any other way?

            • 3. Re: How do I reclaim "uncategorized" memory?
              Michael J.A. Smith Adobe Employee

              Any objects that you allocate from ActionScript will show up under ActionScript Objects, as will strings (regardless of whether you or Flash Player created them). Flash Player does do some interning of strings, but the logic behind which strings it interns is kind of complicated (trying not to intern strings that are clearly transient). If they are interned though, they'll still be part of ActionScript Objects, so it's nothing to do with the Uncategorized memory you're seeing.


              Flash Player memory allocation works by obtaining blocks of memory from the operating system, and doing its internal allocations within these blocks. It has different blocks for storing different sizes of object (with objects above a certain size being allocated directly from the operating system), and this avoids fragmentation. Of course, it can be the case that Flash Player has allocated a block and is only using a small part of it - in this case the Total Memory in Scout will include the size of the entire block, but the Used Memory will only include the part of the block that's in use. So the memory in the "Uncategorized" category really is in use; it just hasn't been recognised as belonging to a more specific category. If you want to get really technical, Uncategorized memory is computed, not measured - we measure Used Memory, and memory for other specific categories (e.g. ActionScript objects, Bitmaps etc), and Uncategorized Memory = Used Memory - (sum of memory in known categories).


              We'd be happy to take a look and see what the cause of your Uncategorized memory is, if you're able to send us a copy of your content (you can email me at michsmit@adobe.com).