• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Its is possible??

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frndz,
1.Its is possible to check how many string objects in string pool and see these object through any example programe.
2. Also i want to check how many string objects create out of string pool or any memory location.
waiting youre reply...
thanx
Aftab Abbasi
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are writing the application, each time you create a string, just add 1 to a static variable counter.
If you are asking to inventory the java heap - not a clue.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I doubt you can do that from java code directly. intern() in String is a native method, which means this pool is somewhere on the VM implementation level. Possibly, you can get this info using some sort of -Xprof option supplied to the java executable or use some sort of Java profiler like JProbe. They use native Java profiling interface to get all that data. You can also write some native code to get that info.
-VG.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic