Heap max limit

Hello, I have done some tests to check the heap size of an application.
This is my test code:
public class Main {
     public static void main(String[] args) {
          Runtime runtime = Runtime.getRuntime();
          // Max limit for heap allocation.
          // It's in bytes.
          long heapLimitBytes = runtime.maxMemory();
          // Currently allocated heap.
          // It's in bytes
          long allocatedHeapBytes = runtime.totalMemory();
          // Unused memory from the allocated heap.
          // It's an approximation, it's in bytes.
          long unusedAllocatedHeapBytes = runtime.freeMemory();
          // Used memory from the allocated heap.
          // It's an approximation, it's in bytes.
          long usedAllocatedHeapBytes =
               allocatedHeapBytes - unusedAllocatedHeapBytes;
          System.out.println("Max limit for heap allocation: " +
                    getMBytes(heapLimitBytes) + "MB");
          System.out.println("Currently allocated heap: " +
                    getMBytes(allocatedHeapBytes) + "MB");
          System.out.println("Used allocated heap: " +
                    getMBytes(usedAllocatedHeapBytes) + "MB");
     private static long getMBytes(long bytes) {
          return (bytes / 1024L) / 1024L;
}Then I run this program with the option -Xmx1024m, and the result was:
On windows: Max limit for heap allocation: 1016MB
On HP-UX: Max limit for heap allocation: 983MB
Someone knows why the max limit is not 1024MB as I requested?
And why it shows a different value in windows than in HP-UX?
Thanks
Edited by: JoseLuis on Oct 5, 2008 11:29 AM

Thank you for the reply
I have checked and the page size in windows and HP-UX is 4KB.
Also, in the documentation for the -Xmx flag it says that the size must be multiple of 1024 bytes and bigger than 2 MB.
I may understand that the allocated size can be rounded to the nearest page (4 KB block), wich give you a difference less than 1 MB between the requested size and the real allocated size, but in windows the the difference is 8 MB and in HP-UX the difference is 41 MB. It's a big difference.
Am I missing something?

Similar Messages

  • How to change the Max limit in the Ring

     Hi all,  
     I am try to use a Ring to set up 4 different of Freq form 18Hhz to 20Ghz but the ring Max limit only 65535. How could I change the max limit? Or any way we could set up 4 diffirence Freq number for user select any one they want to use. 
    Thank you
    Solved!
    Go to Solution.

    you could use a case structure and wire your ring control to it and then send the frequency you from the case structure
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome

  • How to increase the the max limit column in pivot view in BIEE 11G?

    Hi Experts,
    How to increase the the max limit column in pivot view in BIEE 11G?
    When the number of column exceed 256 in pivot view, it will generate the following error message as below:
    Exceeded configured maximum number of allowed output prompts, sections, rows, or columns.
    Error Details
    Error Codes: IRVLJWTA:OI2DL65P
    Location: saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool.socketrpcserver, saw.threads
    SQL Issued: 13678~vid1ptgt0v5ubh39gesnauuhl6
    For example:
    ----------------Day
    Country-----20120101---20120102---..........20121231
    China--------10000---------20000----......

    Try increasing the Max Rows in Instanceconfig.xml
    Path:-Middleware\instances\instance1\bifoundation\OracleBIPresentationServices\instanceconfig.xml
    <ServerInstance>
    <Views>
    <Pivot>
    <MaxVisibleColumns>300</MaxVisibleColumns>
    <MaxVisiblePages>1000</MaxVisiblePages>
    <MaxVisibleRows>500</MaxVisibleRows>
    <MaxVisibleSections>25</MaxVisibleSections>
    <DefaultRowsDisplayed>30</DefaultRowsDisplayed>
    </Pivot>
    </Views>
    </ServerInstance>
    Try adding this in the config file and restart the services.
    Mark as correct if it is helpful.
    Thanks.

  • FBZP different Max limit and amout limit in bank determination

    HI:
    FBZP there is "Maximum limit" in company code level/payment method
    what is differnt with "Amount limit" / Availble for outgoing payment in Bank determination.
    I have try to create invoice with payment method which exceed  max limit at company code or at bank determination, but system still select my invoice to process.

    Hi Mandy,
    Maximum amount at the level of Co. Code/Pmt method means, that system at the time of creating payment documents will not pick up any payment which exceeds this amount.
    For example, you you have a payment method "Cheque" and the organization wants to set up a maximum limit for the cheque payment, then you can specify maximum amount here and F110 will not issue any cheque exceeding this amount.
    Available amounts is maintained at the Bank account level( I have explained this in a previous thread you had raised)
    So, in short, you can say, maximum amount is for a single payment document that is created and available amount is the amount that is available to make all the payments from the proposal list.
    For your testing : Check whether the Payment method is specified at the item level in your posted document, if yes, remove it and try again. If you read SAP help on this field it says -
    " Items in which the Payment method has already been specified are excluded from this.In these cases, the payment method specified is also valid if the maximum amount is exceeded"
    Regards,
    Kavita

  • Max limit reached for tablespace in SAP BW

    Hi Friends,
    We are having one SAP BW system on DB6, AIX...in that the max limit for tablespabe is 512GB, which is going to be exceeded soon...
    So it is planned to move some tables from tablespaces of aggregates i.e. FACTI, FACTD into new tablespaces...
    How can this be achieved?
    Thanks & Regards,
    Kunal Patel.

    He Kunal,
    As mentioned by Jens, you can use the DB2 9's Large RIDS (Larger Record Identifiers) support which significantly increases the size limit for table space.  SAP has a tools to do the conversion for you - OSS Note 11058956 (ABAP tool for activating large RIDs).
    Regards,
    -Beck

  • Material Transaction sequence reached max limit in Version 11.0.3

    Problem Desc:
    Oracle Applications Version 11.0.3
    Material Transaction sequence reached max limit.
    Material Transaction sequence got exhausted.
    All the material transacted got stuck in AQ Process.
    Material transactions done are pertaining to PO Receipts, Sub Inventory transfer, Inter Org transfer,
    Could you please advice a solution.
    Thanks and Regards
    Aditya

    Hello,
    I had similar problem standard seq reached max limit. I could not book sales order. Solution from metalink was simple alter seq.
    http://docs.oracle.com/cd/B13789_01/server.101/b10759/statements_6014.htm
    MAXVALUE
    Specify the maximum value the sequence can generate. This integer value can have 28 or fewer digits. MAXVALUE must be equal to or greater than START WITH and must be greater than MINVALUE.
    Regards,
    Luko

  • Steps max limit  in a Job Chain

    Hello experts,
    The SAP recommanded that the minimum number of steps in Job Chain for performance purpose.
    Can anybody tell , Is there any max limit on the number of steps in a Job chain?
    Thanks ,
    Suresh Bavisetti

    Can you reference the documentation where you see a minimum number of steps in a job chain recommended? I think there is no upper limit for the number of steps in a chain. How many steps are you thinking of adding?
    Or are you talking about nesting job chains within other job chains? Pleas eclarify if this is the case.
    Rgds,
    David Glynn

  • Max. limit of number of chapters?

    I submitted my ibook and now got a ticket saying something is wrong in landscape mode. The selection at the bottom does not work properly. I have 64 chapters. What is the max. limit?

    Rectification,
    In fact it seems whether it is the synchronization of the files which does not work well, " to Analyze the update of metadatas "
    In the synchronization the import is correctly made, and the process of reading of metadatas seems to take place normally - but ineffective.
    On the other hand, by selecting all the photos of the current file  and by using the function ' Metadatas / to Read metadatas since the file ', I managed to go into Lightroom the missing metadatas.
    There is thus probably not a limit of the number of keywords, but a dysfunction during their import from an external source.
    Rectification,
    En fait il semble que ce soit la 'synchronisation des dossiers' qui ne fonctionne pas bien, au niveau de "Analyser la mise à jour des métadonnées"
    A la synchronisation l'importation se fait correctement, et le processus de lecture des métadonnées semble se dérouler normalement - mais sans effet.
    Par contre, en sélectionnant toutes les photos du dossier en cours et en utilisant la fonction 'Métadonnées / Lire les métadonnées depuis le fichier', j'ai réussi à rentrer dans Lightroom les métadonnées manquantes.
    Il n'y a donc sans doute pas de limite du nombre de mots clés, mais un dysfonctionnement lors de leur import à partir d'une source externe.

  • Max limit for Hierarchy

    Hi,
    The client has varying levels of people reporting levels.Some go down just three levels, others go down 14 levels.
    What is robust way to model and store that hierarchy and present its hierarchy values in OBI.
    Is 11 the max limit for Hierarchy?
    Thanks

    AFAIK, I dont think there is any thing limiting about OBIEE in terms of max. levels within a hierarchy other than the limits set by your data source (oracle has 1000 column limit AFAIK in a table).
    Swapan.

  • Bad practice to always fill recordable media dvd etcetera to the max limit?

    I burn a lot of dvd, bluray etcetera.
    I see that for example Blu Ray Bd-R has a max capacity of 23.31 GB (single layer).
    I have heard that you are not suppose to fill it to the max limit due to quality of burning for long time storage, but cannot understand why eventually.
    Any good guidelines for this?

    Yes, I agree, the chance of bad sectors, or the need for an extra metafile block can means filling the disc is undesirable, especially if just adding plain data. 
    Here's what I have to say about CDs*:
    http://www.macmaps.com/cdrfailure.html

  • Max limit job servers with bods

    Under Tools > options > job server > environment>
    max number of engine processes= 8
    what does that mean, does it mean this BODI can run 8 job servers parallell?
    Are there a max limit of job servers?
    thank you very much for the helpful info.

    Michael, good post .... follow-up question on this:
    Per your replay if I have a job that has 2 dataflows that run in parallel I should be able to see 3 processes being launched.
    And on my linux sever using "ps -f -u myuser" I would see processes like:
    /app/bods/sapbo/dataservices/bin/al_engine -PLocaleUTF8<snip>
    /app/bods/sapbo/dataservices/bin/al_engine -C/app/bods/sapbo/dataservices/log/command<snip>
    /app/bods/sapbo/dataservices/bin/al_engine -C/app/bods/sapbo/dataservices/log/command<snip>
    Correct?
    Mike

  • Min/max limit of basic

    Hi all,
    I have maintained min/max limit of basic under the node "Define pay scale salary ranges" but system is not restricting when I am entering a value a value outside that range.
    Tomesh

    Hi Tomesh,
    For which country are you doing it? That node is valid only for Canada & USA, I believe.
    (To see which node is applicable for which country, go to Additional information on Top Menu bar on IMG and select Country assignment) It will display the name of country where that particular node will be applicable.
    Regards,
    Dev

  • GTX 970 4g OV max limit...any problem with that??

    Hi, my 970 stock voltage is 1,212v and the ASIC is 65,4% (quite low) and vbios 84.04.2f.00.f1 ...in afterburner, despite there is a slider from 0 to +87v it seems like there is only 3 steps in voltage increase...for me they are:
    +0=1,212v
    +0 to +25mv=1,237v
    +25 to +87mv=1,256v
    -Is it SAFE to run the card at 1,256v 24/7 (obviously only when gaming)???
    -Why the slider is not applying the voltage in increments as slider indicates??, I mean, +37mv should be = +37mv voltage increase right??
    -And the most important thing...ONLY when voltage reach 1,256v I see in the graphs that the OV MAX LIMIT = 1 all the time (or most part) so I wonder is its SAFE to run the card with ov max limit =1???...according with the 1,256 I think there is lots of people running the card this way but not sure if ov max limit =1...
    Finally, I can run the card at 1486Mhz core (+170) and 3507Mhz memory (+0) at +25mv (1,237v) without the ov max limit at 1 should I leave the card just there???
    Many many thanks guys!!

    Quote from: watermanpc85 on 28-April-15, 19:22:29
    Thanks for the reply...I dont know hopw to upload the actual bios file but I recently updated the bios to the .186 version (latest)...now it says 84.04.36.00.f1.
    The vbios version is NV316MH.186 the numbers from gpu-z (84.04.36.00.f1) are irrelevant and do mean nothing.
    Quote from: watermanpc85 on 28-April-15, 19:22:29
    So I asume that there is not any problem by running the card with OV max limit=1 right???(as soon as the voltage is 1,256v)...anyway right now is a non sense for me because as soon as I increase voltage to 1,256v the card reaches max TDP limit and then it throtles...I would need to increase the TDP limit then...I have researched in the net but I cant find I CLEAR solution on how to increase the little 10% default...is there any "easy" way to do it??
    It just means that you reached the point where no more increases are possible.
    For increasing power limit further than is allowed by default a vbios mod is required that comes with a risk and voids warranty. If you are not familiar with vbios mods than there is no safe and easy way.

  • JVM heap size limit under Windows

    Hi,
    I'm looking either for some help with a workaround, or
    confirmation that the information I've found is still the case for the
    current state of Java.
    Development machine is Win XP Pro, 2G RAM.
    Biggest heap I can allocate is about 1.6G, and that is not large enough for this
    app.
    I have a Swing application that
    1) must run on Win XP, 32 bit
    2) must implement an editor (similar to Excel but with fewer features) to handle large csv files
    ( up to about 800Mb).
    3) Strong preference for Java 5, though higher could conceivably be supported.
    Research so far tells me that this is the result of process memory limitations
    of Windows and the JVM, and that I might be able to squeeze a little more heap with
    Windows' rebase command, but probably not enough and I would start running the
    risk of conflicts with other applications on my users' systems. Ugh.
    Also I read of the Windows /3GB switch, but posts say that the JDK's available are not
    built to be able to use that feature. I havent had a chance to add memory to
    test that yet. However, I'm also under the impression that I should be able to
    allocate a heap larger than physical RAM ... except for that process size limit.
    So ... my information is basically that I'm stuck with a limit of about 1.6G for
    heap size, regardless of the RAM on my computer.
    Can anyone confirm whether that is still correct, preferably with a pointer to some
    official reference ?
    Or better yet, point me toward a workaround?
    Thanks!
    -tom

    >
    Some bookmarks I have on this topic.
    http://sinewalker.wordpress.com/2007/03/04/32-bit-windows-and-jvm-virtual-memory-limit/
    http://stackoverflow.com/questions/171205/java-maximum-memory-on-windows-xp
    The first link pulled together what I found in lots of bits and pieces elsewhere, nice to have a coherent summary :)
    The second link offered a bit of insight into the jvm that I hadn't seen yet .
    Thanks!

  • Generate new schdule lines in MMSA after the max limit I.e.9999 is reached

    Releases are not feeding into MMSA  since it has reached the max. schedule line. Now if i want to create new released in the same MMSA what i have to do.
                                 In other words i want to know how to generate new schedule lines in MMSA once they reached the max.i.e.9999.

    Hi,
    You cannot create new schedule lines after reaching the maximum limit. Please check which document type you are using PL or LPA. LPA is ment for release . Hope it works. Thanks.

Maybe you are looking for

  • How can I receive phone calls in my iPad cellular?

    I've an iPad wifi+cellular, shouldn't be able to do and receive call as a regular phone?

  • In which tables (ABAP) the Project System Information Will be stored

    Dear Guruu2019s Happy New Year In project systems can we able to see, against the projects and against WBS what all the sales orders, Employees and material etc... That we assigned, in which STD report we can check all these assignments, from which t

  • Import pictures

    Hello all Have had much success assigning a picture to user accounts (which appear in login lists on clients) via Workgroup Manager in the past. It's quite easy to turn the inspector on, click an account, add a Picture attribute and tell it where to

  • Driver for my Integrated 10/100 BASE-T Ethernet LAN

     need drivers for integrated 10/100base-t ethernet lan driver win8 x 64bit i have the HP 15-d103tx Notebook PC   here  http://h10025.www1.hp.com/ewfrf/wc/document?docname=c04206739&tmp_task=prodinfoCategory&cc=us&dlc=en...  please help

  • SaveEntity, pass in a form structure.

    I've just started playing with ORM, and one thing I learned pretty quickly is that I need to completely rework the way I think of my data and how I work with it, so forgive me if these questions seem odd. For years now, for each 'object', I have writ