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 8523477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:25:13+00:00 2026-06-11T07:25:13+00:00

Is there anyway to set a breakpoint in eclipse or another debugger such that

  • 0

Is there anyway to set a breakpoint in eclipse or another debugger such that the execution stops on the construction of an array? I am particularly interested in the construction of a primitive array (int[]) but this question should be equally applicable to any array.

I need to find the culprit(s) creating large amount of garbage consisting of int[], char[] and byte[] among others, so if I can put a breakpoint with some conditions, I will be able to narrow the code down.

I tried using yourkit memory profiling, but it only shows allocations for only a tiny portion of these objects and the rest are shown as <objects without allocation information>, I am not sure why. When I go into the Objects unreachable from GC roots view, I see allocation information for only about 7% of the garbage. With allocations for such a small percentage of objects, I am not even sure if I am missing some locations. Is there a way to get YK to preserve all allocations?

  • 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-06-11T07:25:15+00:00Added an answer on June 11, 2026 at 7:25 am

    When you construct an array, the VM simply reserves that much memory space for to be filled in references. This is a single step native operation and a break-point in the memory allocation process will not be possible . For example take the following code

    public class Test{
    
     public void createArray(){
    
            int[] iarray = new int[10];
    
        }
    
    }
    

    Now if you disassemble this, you get following set of instructions

    Compiled from "Test.java"
    public class Test extends java.lang.Object{
    public Test();
      Code:
       0:   aload_0
       1:   invokespecial   #1; //Method java/lang/Object."<init>":()V
       4:   return
    
    public void createArray();
      Code:
       0:   bipush  10
       2:   newarray int
       4:   astore_1
       5:   return
    
    }
    

    Notice the definition of method createArray(), newarray int is a single instruction to allocate the memory to specified number of elements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way I can set a symbolic breakpoint that will trigger when
Is there anyway to stop automatic DataContext inheritance in Silverlight? I Set my DataContext
I was wondering if there's anyway to filter a set using NSPredicate sorted by
there is one think, i can't understand anyway:((( when i try to set cookie(it
Is there any way to set a cookie that is not readable on subdomains?
Is there any way to set a breakpoint in XCode so it breaks every
Is there anyway to set the variables of all instances of a class at
Is there any way to set breakpoint on setter/getter in auto-implemented property? int Counter
Is there any way in Firebug to set a breakpoint in an external .js
Is there anyway to set local notification repeatinterval every 10 min. I try to

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.