# Understanding totalMemory

**URL:** <https://forum.kirupa.com/t/understanding-totalmemory/275942>\
**Category:** flash\
**Created:** [November 20, 2008, 1:07pm UTC](https://forum.kirupa.com/t/understanding-totalmemory/275942 "2008-11-20T13:07:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Didi32](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Didi32](https://forum.kirupa.com/u/Didi32)\
**Post date:** [November 20, 2008, 1:07pm UTC](https://forum.kirupa.com/t/understanding-totalmemory/275942/1 "2008-11-20T13:07:53Z")

</div>

Hi,

I am currently making some sort of photo gallery and in an attempt to optimize my application, I am tracing the System.totalMemory on click of thumbnails. I am however a bit puzzled by the information it is returning and whether this is a good thing or a bad thing.

First click returns the following number: 6103040

What are these, bytes?

the second click brings me to 6221824 of memory usage.

I skip many clicks, click 35 I’m at 7962624, but on click 36, I believe the garbage collection has been processed and I am at 6336512 of memory usage.

Do you believe this is acceptable memory usage? I’m not sure whether it’s something acceptable for other - maybe less powerful - computers.

Thanks,

Didi
