How the memory is allocated

how the memory is allocated to the jvm when it is initially started and how we ca increase the memory of the jvm as per the requirements plz any body help ,e out iam very much new to the java programming and advanced thanks

just i want to know about the stack memory Actually, you don't because you should not need to worry about it unless you try to use too many threads. e.g. over 2000 threads.
and the heap how it will allocated Memory is pree allocated to about 2 MB and grows as required.
Run the jvm with the -verbosegc option to see how memory is allocated.
If you want more detail use a memory profiler such as jprofiler, optimiseit, or jprobe.

Similar Messages

  • How much memory is allocated to windows in boot camp?

    I have a 2 GHz Intel Core Duo iMac running Snow Leopard with 2 GB of RAM (maxed) circa 2006, the last big white iMac.  It runs very well.  Since I need to use a Windows software program for a work function I installed Fusion and Windows XP a few years ago.  This got the job done, however Fusion split the RAM equally between Windows and OS X and I find everything runs extremely slowly.  Especially with the latest updates to Fusion, I wonder if it just doesn't have enough memory to run properly (when I boot up Windows in Fusion, it takes about 15 min before it's functional).  I could change the allocation but then whichever OS got the smaller amount of RAM would freeze up even more.  Windows is kept fully up to date and I use an antivirus/firewall.  I am thinking of installing Windows XP on the Mac via Boot Camp but wanted to know: since it's a separate partition, would all of the 2 GB of RAM be available to Windows while that OS was running, or would it again be split?
    This is my last shot before being forced to buy a Windows laptop...thanks for your time (:

    Hi,
    since you have to reboot your Mac in order to run a BootCamp Windows, all the available hardware resources are exclusive used by Windows.
    Therefor the full 2GB RAM is useable in a BootCamp Windows.
    Regards
    Stefan

  • How the memory alloaced

    Hello friend i am new to java...
    Please help me out..
    class RaceCar
    private int carNumber;
    private static int count ;
    public RaceCar()
    count++;
    carNumber = count;
    public void showCarNumber()
    System.out.println("Car number is " + carNumber);
    public static void showCount()
    System.out.println("Count is " + count);
    class RaceCarDemo
    public static void main(String[] args)
    //block 1
    RaceCar x = new RaceCar();
    RaceCar y = new RaceCar();
    RaceCar a = new RaceCar();
    RaceCar d = new RaceCar();
    RaceCar dd = new RaceCar();
    RaceCar yd = new RaceCar();
         //which line is compiled first
         // Flow of execution
    //block 2
    x.showCarNumber();
    y.showCarNumber();
              //how is the car number of is x is show 1 and y as 2 correctly.
              //does it store the values in x,y,...
    //block 3
    RaceCar.showCount();
    d.showCount();
              //Can we call showCount with any object of the race car.
              // where the value of count is stored
    x.showCarNumber();
    Q Are all the Blocks 1 2 3 are compiled one after the other or all the variable of x, y ,... are compiled or after the other, i want to how exactly the program is compiles... like in c++ by pressing f7(may be f6) we can compile one after the other statement, in the same way do we have in java... so that i can check which statement compile one after the other.
    // Flow of execution
    //how is the showCarNumber of is x is show 1 and y as 2 correctly, where the value of x is stored.
    //does it store the values in x,y,...
    Thank you.
    Edited by: 882702 on Aug 31, 2011 2:47 PM

    First of all, you should format your code by placing it between \\ tags.
    >
    Q Are all the Blocks 1 2 3 are compiled one after the other or all the variable of x, y ,... are compiled or after the other, i want to how exactly the program is compiles
    >
    I am not sure I understand your question, but compilation order is pretty much irrelevant in Java. The compiler makes multiple runs through the code so it does not need any equivalent to the C++ forward reference.
    If you are asking about the order it will run in, the code should run in the order it is given.
    >
    //how is the showCarNumber of is x is show 1 and y as 2 correctly, where the value of x is stored.
    //does it store the values in x,y,...
    >
    Could you please rephrase these and explain in more detail?

  • How to manage the memory within this JNI code

    This is a piece of JNI code that i had written..........
    i am calling these methods in a infinite loop to listen for changes......
    if a change has occured it shpuld get changed. other wise not....
    But the memory is allocated 4 bytes every second.... even if the user doesnt makes a change....... ( memory increases with TIME....... )
    How to get rid of this problem
    Please Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    #include <jni.h>
    #include "ParameterClass.h"
    #include <stdio.h>
    #include <scrpcdll.h>
    const char *NetAddr = "";
    const char *str = NULL;
    int sp= 0;
    double value= 0;
    jsize doubleLen = 0;
    jsize strLen = 0;
    int val=0;
    int i= 0 ;
    jdouble *body = NULL;
    const char *name = NULL;
    jstring *string = NULL;
    const char *tableStr = NULL;
    int sp1 = 0;
    double value1 = 0;
    JNIEXPORT jdouble JNICALL
    Java_ParameterClass_IdentificationValue(JNIEnv *env, jobject obj,jstring parameterName,jdouble parameterValue)
         if(SC_ConnectToSoftcar(NetAddr))
              str = (*env)->GetStringUTFChars(env,parameterName,NULL);
              sp = SC_AddVari(str, 6, "M");
              SC_Set(sp,parameterValue);
              (*env)->ReleaseStringUTFChars(env,parameterName,str);
              (*env)->ReleaseStringUTFChars(env,parameterName,NULL);
              value = SC_Get(sp);
         (*env)->DeleteLocalRef(env,parameterName);
         return value;
    JNIEXPORT void JNICALL
    Java_ParameterClass_OnlineValue(JNIEnv *env1,jobject obj1,jobjectArray str,jdoubleArray doArr)
         if(SC_ConnectToSoftcar(NetAddr))
              doubleLen = (*env1)->GetArrayLength(env1, doArr);
              strLen = (*env1)->GetArrayLength(env1,str);
              body = (*env1)->GetDoubleArrayElements(env1,doArr,NULL);
              for(i = 0; i < doubleLen; i++)
                   *string = (jstring)(*env1)->GetObjectArrayElement(env1,str,i);
                   name = (*env1)->GetStringUTFChars(env1,*string,NULL);
                   val = SC_AddVari(name, 6, "revs");
                   SC_Set(val,body);
                   (*env1)->ReleaseStringUTFChars(env1,*string,name);
                   (*env1)->ReleaseStringUTFChars(env1,*string,NULL);
              (*env1)->ReleaseDoubleArrayElements(env1,doArr,body,0);
              (*env1)->DeleteLocalRef(env1, *string);
         SC_DisconnectFromSoftcar();
         return;

    Hai,
    Thanks for your comments.......
    In Java i call the JNI methods inside a Infinite loop...
    when i comment this Infinite loop then the memory doesnt Increase at all.....
    but i cannot comment since i need a functionality to execute through JNI.....
    so if i uncomment this Infinte loop then i get a Probelm.........
    This is the JAVA CODE which calls JNI CODE:::::::::::::::::::::
    while(loopForever)
         streamWrite();
         System.gc();
    public void streamWrite()
    // Getting the Parameter Value from the Softcar
         for(i = 0; i < newparameterArray.length; i++)
              newparameterArray[i] = valueClass.returnIdentificationValue(prefix+parent.parameterName);
              System.gc();
    /*Checking the Array of values: Checking which value of the Array has changed in Softcar      Checking for the Elements of the Array which had been changed by the User if the change is made then Updating to the ASAP-3 Server.........*/
         if(Arrays.equals(parameterArray,newparameterArray) == true)
              for(i = 0; i < newparameterArray.length; i++)
              newparameterArray[i] = valueClass.returnIdentificationValue(prefix+parent.parameterName[i]);
              System.gc();
         else{
              for(i = 0; i < newparameterArray.length; i++)
                   if(parameterArray[i] != newparameterArray[i])
                        parameterArray[i] = newparameterArray[i];
                             parent.commandparameters.setapsparameters.parameterField.setText(parent.parameterName[i]);
                             parent.commandparameters.setapsparameters.parameterValueField.setText(Double.toString(newparameterArray[i]));
              try{
                   bos.write((byte[])parent.commandparameters.setapsparameters.setParameterArray());
                   bos.flush();
                   Thread.sleep(500);
                   readfromStream();
                   serverResponse();
              }catch(IOException exception){System.err.println(" Write Stream Exception" + exception.getMessage());}
              catch(InterruptedException ie){System.err.println(ie.getMessage());};
              //parameterArray[i] = newparameterArray[i];
              System.gc();
    //Getting the TableValue from Softcar.......
              for(j = 0; j < Integer.parseInt(parent.xDimension); j++)
                   newtableValueArray[j] = valueClass.returngetTableValue(arrayString[j]);
                   System.gc();
    //Comparing the Values ( whether the user has chaged the TableValue )
              if(Arrays.equals(tableValueArray,newtableValueArray) == true)
                   for(j = 0; j < newtableValueArray.length; j++)
                        newtableValueArray[j] = valueClass.returngetTableValue(arrayString[j]);
                        System.gc();
              else
                   for(j = 0; j < newtableValueArray.length; j++)
                        if((tableValueArray[j] != newtableValueArray[j]))
                             tableValueArray[j] = newtableValueArray[j];
                             parent.commandparameters.setlookupparameters.yindexField.setText(parent.yDimension);
                             parent.commandparameters.setlookupparameters.xindexField.setText(Integer.toString(j+1));
                             parent.commandparameters.setlookupparameters.valueField.setText(Double.toString(newtableValueArray[j]));
                             try{
                                  bos.write((byte[])parent.commandparameters.setlookupparameters.setlookupArray());
                                  bos.flush();
                                  Thread.sleep(500);
                                  readfromStream();
                                  serverResponse();
                             }catch(IOException exception){System.err.println(" Write Stream Exception" + exception.getMessage());}
                             catch(InterruptedException ie){System.err.println(ie.getMessage());};
                             System.gc();

  • How and when does Berkeley free the memory of key and data ?

    Hi,
    even though i just have posted a question several days ago, i couldnt find an answere to these questions in the Berkeley docs or on the internet:
    Does Berkleley Db free the data that is handeled to it with the key or the data objekt ?
    When is it free?
    How is the data managed that is in the secondary databases which points directly to the primary database and do i have to copy it?
    It would be great to have some answeres, because its hard to write something with low memory use, when you dont know how the memory is treated.

    Hi,
    Does Berkleley Db free the data that is handeled to it with the key or the data objekt ?Records in the berkeley db is stored as 'Key' & 'Data' pair. The data is accessed into / from the db using the 'Key'. The data in the db is freed when it is deleted.
    When is it free?The data in the db is freed after 'delete' followed by 'checkpoint' operation.
    How is the data managed that is in the secondary databases which points directly to the primary database and do i have to copy it?The secondary database is just another regular database whose 'Key' is what you choose it to be and the 'Data' is the key in the primary database. The primary and secondary databases are connected using the DB->associate() call. More info with example on this is available here : [http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am/second.html]
    Debsubhra Roy

  • How to find out how many memory is used for NIO

    is there any way to find out how many memory is used for nio in a virtual machine. ?
    I know that is possible to find out how many total, free and used memory the heap has by using java.lang.Runtime#totalMemory...
    We sometimes expect errors that it is not possible to create any more connections because of the NIO memory size but the heap is still ok. Today we had an error where 170mbytes of heap where left but it was not possible to create new tcp connections because of an exception:
    javax.naming.NamingException: java.net.SocketException: No buffer space available (maximum connections reached?): connect
    The number of TCP-Connections was ok (<500).
    It would be very nice if someone knows how to find out how the amount of memory that NIO buffers use can be determined within Java 1.4.
    best regards
    benjamin

    We have to use 1.4.2_03. This is because of the special environment we are running on.
    We did also figured out that there are some NIO Memory Bugs but we since we are not allowed to upgrade the used Virtual Machine we have to live with these errors.
    The problem that we currently have is within a Server and because of this circumstance we are trying to find a workaround or way to find out how many memory is allocated. If we would know how to get this value we could restart the servers as a workaround after the value reaches a threshold.
    We are also very sad that we can`t easily upgrade/update to the latest 1.4.2 Version or the newest 1.5 to get rid of these NIO Bugs!

  • How can I get the memory allocation info of a java thread?

    Now I am going to write a program to monitor the execution condition of the java threads. But it seems that the classes in standard edition of JDK does not provide facilities to get the information such as the memory allocation and CPU time of a running thread. How can I do with it? Can I use JNI or JVMDI to get them? If it could do, how?

    Thanks a lot. I just browsed the specification of jvmpi. It is interesting and it seems that I can get the information I need. However, if I want to get the information in my program, I mean, if I want to build a class which may use JNI method to invoke the function written with JVMPI, and then forward the data to other upper layer objects, can it be done?

  • How to find the current CPU and Memory (RAM) allocation for OMS and Reposit

    Hi There,
    How do I check the CPU and memory (RAM) allocation for the OMS and the Repository database? I'm following the "Oracle Enterprise Manager Grid Control Installation and Configuration Guide 10g Release 5 (10.2.0.5.0)" documentation and it says to ensure the following:
    Table 3-1 CPU and Memory Allocation for Oracle Management Service
    Deployment Size Host CPU/Host Physical Memory (RAM)/Host Total Recommended Space
    Small (100 monitored targets)                   1                                             1 (3 GHz)                            2 GB                                                                        2 GB
    ***Table 3-2 CPU and Memory Allocation for Oracle Management Repository***
    Deployment Size Host CPU/Host Physical Memory (RAM)/Host Total Recommended Space
    Small (100 monitored targets)                   1                                   1 (3 GHz)                                        2 GB                                                                          10 GB
    Thanks,
    J

    Hi J,
    This is the minimum requirement. However It will work fine.
    Also read below article on "Oracle Enterprise Manager Grid Control Architecture for Very Large Sites"
    http://www.oracle.com/technology/pub/articles/havewala-gridcontrol.html
    For GRID HA solution implementation please read :
    http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gR2_EnterpriseManagerBestPractices.pdf
    Regards
    Rajesh

  • How best to configure the memory allocation

    Hi,
    Anyone could advise how best to configure the memory allocation by setting up
    the value for
    -Xms
    -Xmx
    -XX=NewSize
    -XX=MaxNewSize
    -XX:SurvivorRate
    -XX:MaxPermSize
    for weblogic Express 8.1 and the server has about 4G RAM ?
    Thanks.

    Hi Chandra,
    "Chandra" <[email protected]> wrote in message news:[email protected]..
    Anyone could advise how best to configure the memory allocation by setting up
    the value for
    -Xms
    -XmxSet -Xms == Xmx == 512m
    -XX=NewSize
    -XX=MaxNewSize
    -XX:SurvivorRate
    -XX:MaxPermSizeSet -XX:MaxPermSize == 64m
    and see how it goes.
    for weblogic Express 8.1 and the server has about 4G RAM ?This is way too much for a single weblogic instance. Normally 512-1024Mb
    is enough. I'd consider partitioning it to multiple instances with that much
    of memory. Lesser memory means faster GC.
    HTH
    Regards,
    Slava Imeshev

  • Hi how can i know the memory allocation of occurs 10 or 100

    hii
    experts,
    how can i know how much memory is being allocated for for occurs n(10 ,100)
    for an internal table declaration.is there any tcode to know that??
    plz help.
    thank you

    Hi,
    welcome to sdn,
    Occurs 10 means the internal table allocates space for 10 rows initially....after filling these rows it allocates for the next 10 lines...similarly occurs 100.
    But if you give occurs 0 ,the internal table allocates 8kb space initially...
    these are the major difference....i think you can check the memory allocation of the internal table in the debugging mode instead of using a separate transaction...
    <b>Reward points if helpful,</b>
    regards,
    Jinesh

  • How to use the memory efficiently in SAP systems?

    Hi All,
    We are using  suse linux X86_64 bit OS
    All the instances are present in distributed environment. Eg we have one DB,1 ASCS(Message server and Enqueue), 1 PAS and 1 AAS
    In CRM there are 100 end users are there.
    Database is also 64 bit (Oracle)
    Ram size is 32 GB.
    CPU is:4
    Theoretically I know that the
    RAM:Virtual memory should be 1:2 ratio
    How to find the Virtual memory size in the existing system If it is a freshly installed means then how can we estimate it?
    How to find the SWAP size allocated in the existing system If it is a freshly installed means then how can we estimate it?
    How to find the size of virtual memory is allocated for the live SAP system and DB? And explain how to calculate if it is a freshly migrated system?
    How to find the size of RAM is assigned to SAP and the same for DB?
    If anything is increased in sap level like work process why should we need to increase the process and sessions in oracle and how?
    Kindly help to me to find the solution for this questions?
    Thanks,
    Priyanga G

    Do you see the search functionality in the upper left of the screen?
    Okay, now type in ecatt, press enter and in the next screen filter on blogs.

  • How to determine the Memory size of my computer?

    I need to find a way to determine how much computer RAM i have left. I was suggested to use System class methods like "Runtime.getRuntime().getFreeMemory()", and I need to determine how much Memory I need to use when I launch Java VM with Xmx option.
    I wonder if there is more detail I need to know at this moment? If this question is more suitable in Java VM forum, please let me know.

    This is a slightly messed version of the one in the J2D Demo, use JFrame.add(new MemoryMonitor());
    I'm not entirely sure if it'll work straight off since I messed with it but it should, all the memory stuff is hidden away there somewhere even if it won't.
    Shish
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import java.awt.geom.Line2D;
    import java.awt.geom.Rectangle2D;
    import java.util.Date;
    import javax.swing.*;
    import javax.swing.border.EtchedBorder;
    import javax.swing.border.TitledBorder;
    public class MemoryMonitor extends JPanel {
        static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp");
        public Surface surf;
        JPanel controls;
        boolean doControls;
        JTextField tf;
        public MemoryMonitor() {
         note=n;
            setLayout(new BorderLayout());
            setBorder(new TitledBorder(new EtchedBorder(), "Memory Monitor"));
            add(surf = new Surface());
            controls = new JPanel();
            controls.setPreferredSize(new Dimension(135,80));
            Font font = new Font("serif", Font.PLAIN, 10);
            JLabel label = new JLabel("Sample Rate");
            label.setFont(font);
            label.setForeground(Color.black);
            controls.add(label);
            tf = new JTextField("1000");
            tf.setPreferredSize(new Dimension(45,20));
            controls.add(tf);
            controls.add(label = new JLabel("ms"));
            label.setFont(font);
            label.setForeground(Color.black);
            controls.add(dateStampCB);
            dateStampCB.setFont(font);
            addMouseListener(new MouseAdapter() {
                public void mouseClicked(MouseEvent e) {
                   removeAll();
                   if ((doControls = !doControls)) {
                       surf.stop();
                       add(controls);
                   } else {
                       try {
                           surf.sleepAmount = Long.parseLong(tf.getText().trim());
                       } catch (Exception ex) {note.alert(ex);}
                       surf.start();
                       add(surf);
                   validate();
                   repaint();
        public void start() {
         surf.start();
        public class Surface extends JPanel implements Runnable {
            public Thread thread;
            public long sleepAmount = 1000;
            private int w, h;
            private BufferedImage bimg;
            private Graphics2D big;
            private Font font = new Font("Times New Roman", Font.PLAIN, 11);
            private Runtime r = Runtime.getRuntime();
            private int columnInc;
            private int pts[];
            private int ptNum;
            private int ascent, descent;
            private float freeMemory, totalMemory;
            private Rectangle graphOutlineRect = new Rectangle();
            private Rectangle2D mfRect = new Rectangle2D.Float();
            private Rectangle2D muRect = new Rectangle2D.Float();
            private Line2D graphLine = new Line2D.Float();
            private Color graphColor = new Color(46, 139, 87);
            private Color mfColor = new Color(0, 100, 0);
            private String usedStr;
            public Surface() {
                setBackground(Color.black);
                addMouseListener(new MouseAdapter() {
                    public void mouseClicked(MouseEvent e) {
                        if (thread == null) start(); else stop();
            public Dimension getMinimumSize() {
                return getPreferredSize();
            public Dimension getMaximumSize() {
                return getPreferredSize();
            public Dimension getPreferredSize() {
                return new Dimension(135,80);
            public void paint(Graphics g) {
                if (big == null) {
                    return;
                big.setBackground(getBackground());
                big.clearRect(0,0,w,h);
                float freeMemory = (float) r.freeMemory();
                float totalMemory = (float) r.totalMemory();
                // .. Draw allocated and used strings ..
                big.setColor(Color.green);
                big.drawString(String.valueOf((int) totalMemory/1024) + "K allocated",  4.0f, (float) ascent+0.5f);
                usedStr = String.valueOf(((int) (totalMemory - freeMemory))/1024)
                    + "K used";
                big.drawString(usedStr, 4, h-descent);
                // Calculate remaining size
                float ssH = ascent + descent;
                float remainingHeight = (float) (h - (ssH*2) - 0.5f);
                float blockHeight = remainingHeight/10;
                float blockWidth = 20.0f;
                float remainingWidth = (float) (w - blockWidth - 10);
                // .. Memory Free ..
                big.setColor(mfColor);
                int MemUsage = (int) ((freeMemory / totalMemory) * 10);
                int i = 0;
                for ( ; i < MemUsage ; i++) {
                    mfRect.setRect(5,(float) ssH+i*blockHeight,
                                    blockWidth,(float) blockHeight-1);
                    big.fill(mfRect);
                // .. Memory Used ..
                big.setColor(Color.green);
                for ( ; i < 10; i++)  {
                    muRect.setRect(5,(float) ssH+i*blockHeight,
                                    blockWidth,(float) blockHeight-1);
                    big.fill(muRect);
                // .. Draw History Graph ..
                big.setColor(graphColor);
                int graphX = 30;
                int graphY = (int) ssH;
                int graphW = w - graphX - 5;
                int graphH = (int) remainingHeight;
                graphOutlineRect.setRect(graphX, graphY, graphW, graphH);
                big.draw(graphOutlineRect);
                int graphRow = graphH/10;
                // .. Draw row ..
                for (int j = graphY; j <= graphH+graphY; j += graphRow) {
                    graphLine.setLine(graphX,j,graphX+graphW,j);
                    big.draw(graphLine);
                // .. Draw animated column movement ..
                int graphColumn = graphW/15;
                if (columnInc == 0) {
                    columnInc = graphColumn;
                for (int j = graphX+columnInc; j < graphW+graphX; j+=graphColumn) {
                    graphLine.setLine(j,graphY,j,graphY+graphH);
                    big.draw(graphLine);
                --columnInc;
                if (pts == null) {
                    pts = new int[graphW];
                    ptNum = 0;
                } else if (pts.length != graphW) {
                    int tmp[] = null;
                    if (ptNum < graphW) {    
                        tmp = new int[ptNum];
                        System.arraycopy(pts, 0, tmp, 0, tmp.length);
                    } else {       
                        tmp = new int[graphW];
                        System.arraycopy(pts, pts.length-tmp.length, tmp, 0, tmp.length);
                        ptNum = tmp.length - 2;
                    pts = new int[graphW];
                    System.arraycopy(tmp, 0, pts, 0, tmp.length);
                } else {
                    big.setColor(Color.yellow);
                    pts[ptNum] = (int)(graphY+graphH*(freeMemory/totalMemory));
                    for (int j=graphX+graphW-ptNum, k=0;k < ptNum; k++, j++) {
                        if (k != 0) {
                            if (pts[k] != pts[k-1]) {
                                big.drawLine(j-1, pts[k-1], j, pts[k]);
                            } else {
                                big.fillRect(j, pts[k], 1, 1);
                    if (ptNum+2 == pts.length) {
                        // throw out oldest point
                        for (int j = 1;j < ptNum; j++) {
                            pts[j-1] = pts[j];
                        --ptNum;
                    } else {
                        ptNum++;
                g.drawImage(bimg, 0, 0, this);
            public void start() {
                thread = new Thread(this);
                thread.setPriority(Thread.MIN_PRIORITY);
                thread.setName("MemoryMonitor");
                thread.start();
            public synchronized void stop() {
                thread = null;
                notify();
            public void run() {
                Thread me = Thread.currentThread();
                while (thread == me && !isShowing() || getSize().width == 0) {
                    try {
                        thread.sleep(500);
                    } catch (InterruptedException e) { return; }
                while (thread == me && isShowing()) {
                    Dimension d = getSize();
                    if (d.width != w || d.height != h) {
                        w = d.width;
                        h = d.height;
                        bimg = (BufferedImage) createImage(w, h);
                        big = bimg.createGraphics();
                        big.setFont(font);
                        FontMetrics fm = big.getFontMetrics(font);
                        ascent = (int) fm.getAscent();
                        descent = (int) fm.getDescent();
                    repaint();
                    try {
                        thread.sleep(sleepAmount);
                    } catch (InterruptedException e) { break; }
                    if (MemoryMonitor.dateStampCB.isSelected()) {
                         System.out.println(new Date().toString() + " " + usedStr);
                thread = null;
    public static void main(String s[]) {
            final MemoryMonitor demo = new MemoryMonitor();
            WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {System.exit(0);}
                public void windowDeiconified(WindowEvent e) { demo.surf.start(); }
                public void windowIconified(WindowEvent e) { demo.surf.stop(); }
            JFrame f = new JFrame("Java2D Demo - MemoryMonitor");
            f.addWindowListener(l);
            f.getContentPane().add("Center", demo);
            f.pack();
            f.setSize(new Dimension(200,200));
            f.setVisible(true);
            demo.surf.start();

  • HT3919 In the past was able to adjust the memory for each individual application, my Illustrator CS5 appears is doesn't have enough memory to complete a particular project. How do I boost the amount of memory that Illustrator uses so I can complete my pro

    In the past I have always been able to adjust the memory of each individual application,
    my Adobe Illustrator CS5 appears that is doesn't have enough memory to complete a particular project.
    How do I boost the amount of memory that Illustrator uses so I can complete my project?

    With OS X, it automatically allocates RAM and it can't be allocated manually.
    What model Mac do you have and what OS X version is it running. Your profile shows a PowerMac and OS 10.6.8. A PowerMac can't run OS 10.6.8. It's max OS is 10.5.x
    How much RAM is installed in your Mac? You need to max out the RAM and close other open apps if you are having problems with Illustrator.
     Cheers, Tom

  • How to define the memory leak in stability test

    Hi
    Usually, we run our system with 70% CPU load for 72 hours for stability test (on solaris 10), because some plugin of our system is using mtmalloc, and we use prstat to monitor the memory of each plugin. But because of the complex memory usage of our application, we don't know when the application will use the Max memory, and because of the "mtmalloc", the memory showed by "prstat" will not released but continually increased.
    So fro the test point of view, there is the risk of memory leak, but actually, there may be no memory leak, so my question is how to define the memory leak in such condition.

    kevin wrote:
    Thank you for the input and all the info.
    isn't java heap the same as memory allocated to the java process in my weblogic
    starup script ?The heap is sized by the -Xmx and -Xms parameters you pass on the java
    command-line. The permanent generation is separate.
    >
    let me also download jprobe and try to run it and see what it gives me.
    I'd start by running with -verbose:gc. I'd want to know whether you're
    running out of heap or permgen space.
    -- Rob
    kevin
    Rob Woollen <[email protected]> wrote:
    Unfortunately memory leaks are not fun to track down even with tools.
    I'd first suggest determining whether you're running out of space in
    the
    permanent area (where classes are loaded), or you've exhausted the java
    help space.
    I'd start by adding -verbose:gc. Look at the gc messages right before
    you hit the OutOfMemoryError. If there's plenty of space left, I'd
    suspect you're running out of perm space. Search these newsgroups and
    the web for MaxPermSize, and you should see plenty of info.
    If you're running out of java heap, tools like jprobe and OptimizeIt
    are
    helpful. If you can tell me a little more about your application and
    how you're testing it, I can offer some more tips.
    -- Rob
    kevin wrote:
    Iam new to JAVA and weblogic. I have an application that runs out ofmemory time
    and again.
    please let me know how to pin point this problem and moreover, howto interpret
    or understand that there is a problem. I have downloaded JPROFILE tool,but it
    is very confusing to understand what is goin on in this tool.
    If somebody can let me know how to interpret and understand the memoryleak, that
    will be great !!!
    thank you.

  • How to increase the memory in Event Server

    I have this folowing error in the windows event observer (in french). The memory Event Server memory seems to be to small.  (English message traduction : Insufficient memory in the Event Server"" ).
    How can i increase this memory ? The physical server is dedicated to Crystal server.
    Type de l'événement : Erreur
    Source de l'événement : BusinessObjects_EventServer
    Catégorie de l'événement : EventServer
    ID de l'événement : 35750
    Date : 13/10/2010
    Heure : 09:56:51
    Utilisateur : N/A
    Ordinateur : SERVHLM3
    Description :
    Mémoire insuffisante dans l'Event Server
    I have this folowing error in same time... that talk about maximum limit Windows offices reach
    (English message traduction : "Attempt to allocate Windows 40 offices, only 19 have been allocated. It may be that the system has reached its maximum limit." ).
    Do you know how this can happen ? And how to correct this ?
    Type de l'événement : Erreur
    Source de l'événement : BusinessObjects_crproc
    Catégorie de l'événement : Général
    ID de l'événement : 49301
    Date : 13/10/2010
    Heure : 09:56:54
    Utilisateur : N/A
    Ordinateur : SERVHLM3
    Description :
    Tentative d'allocation de 40 bureaux Windows, seulement 19 ont été alloués. Il se peut que le système ait atteint sa limite maximum. Contactez votre administrateur système.

    As Ankur said, there are not parameters for this setting.
    Probably what you can do is, you can add this server to a defined server group.
    Generally you can assign additional resources to a server group. That could probably help you to increase performance.
    Regards
    Gowtham

Maybe you are looking for