Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6958403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:08:06+00:00 2026-05-27T15:08:06+00:00

Questions Where is the method for my object stored ? and can I see

  • 0

Questions

  1. Where is the method for my object stored ?
  2. and can I see that area if I dump my java app ?

Background

I’m trying to measure the size of my object and realize that methods are not stored in the same place as the object data.

I’m trying to ‘see’ where the code for the methods are stored in a running Java app.

I tried dumping the heap using jmap and inspecting the dump using jhat, but I can’t find anything useful regarding where the methods for my classes are.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:08:06+00:00Added an answer on May 27, 2026 at 3:08 pm

    Where is the method for my object stored

    They are stored within a Class object, which is kept in PemGen space.

    and can I see that area if I dump my java app ?

    This is not trivial. JVM performs several optimizations like JIT compiling which makes this task harder.

    I’m trying to ‘see’ where the code for the methods are stored in a running Java app.

    You are aware that there is just a single copy of every method per class, not per instance? This means that once the class is loaded by the ClassLoader, all methods of that class are stored in memory. It doesn’t matter how many instances you create. That being said, you probably don’t care how much memory do methods consume.

    See also:

    • What's the method representation in memory?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently implementing a method that accepts two bitmap objects. We can assume
As a database architect, developer, and consultant, there are many questions that can be
Ok so I know that you can't have an abstract static method, although I
A few questions have come up recently involving the Application.Evaluate method callable from Excel
The method in question that I want to use is gem and sourced here
Here is the question: write a method that swaps two variables. These two variables
Fairly simple question: I have an init method on my class that has the
Two days ago I wrote this question: How can I retrieve an object on
Note: I've read the following two questions already: Can you explain the concept of
So, I'm working on an app where users can upload and manage photos with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.