uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Danai Wiriyayanyongsuk" <dan...@gmail.com>
Subject Re: Questions regarding the Heap class and the heap size.
Date Thu, 23 Aug 2007 02:20:17 GMT
Adam Lally wrote:
>  Just to clarify: a notable exception is that Strings aren't stored on
>  the heap.  So storing long strings (including the document text) will
>  not increase the heap size.  However, using large arrays *will*
>  increase the heap size.

Thanks Thilo and Adam for the helpful information.

I'd like to understand a bit more on the quote "However, using large arrays
*will* increase the heap size". From my understanding, not all types of
arrays have their size impact the heap (Heap.heap) size. Specifically:

The sizes of the following array types *impact* the size of the heap:
  - integer and float (as the values will be directly stored in the heap)
  - String and other feature structures (as the address of each element
pointing to the related position on other heaps will be stored in the heap)

On the other hands, the sizes of the following array types do *not* impact
the size of the heap:
  - boolean, byte, short, long and double (as there are different heaps to
store the data)

Is my understanding correct?

Thanks,
Danai Wiriyayanyongsuk

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message