Hi, On Wed, Apr 13, 2011 at 7:02 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > kevin diggs <diggskevin38@xxxxxxxxx> writes: > >> Whose string pool is this? The compilers or the program being >> compiled? In other words, would a string literal in my code show up in >> this pool? > > It is the compiler's string pool. String literals in your program are > not stored there. > So is there any way to get the code being compiled's string pool? >> String pool >> entries 3004 >> identifiers 3004 (100.00%) >> slots 16384 >> bytes 34k (4803 overhead) >> table size 64k >> coll/search 0.0695 >> ins/search 0.1855 >> avg. entry 11.93 bytes (+/- 6.49) >> longest entry 42 >> >> The 100.00% in parens confuses me? > > That's the percentag of entries in the table that are used relative to > the number of entries in the table. The garbage collector can mark > table entries unused, and thus reduce the number below 100%. I'm not > sure how much that actually happens in practice. > What threw me was that all of the entries in the compiler's string pool are used for identifiers? What else can end up in it? > Ian >