Howto when i have very very large double array

I have code my program about document retrieval.
I create double array in size [10000]x[8000] for keep value for calculte someting in only memory (about metrix operation).
I have set parameter to heap memory size at 1024m but it not enough, it has exception out of memory.
I use Notebook that have RAM 1G. Is this cause for exception?
Please help me to lead solution for my case.
Thank you.

anurag.kapur wrote:
A couple of points:
1. Your notebook has 1 GB of RAM and you are allocating 1024 MB (=1 GB) to the JVM heap, which is not possible, as you need some space for running various other Operating System processes as well.This is a good point. There are also things in the JVM itself other than the Java object heap that need space. Thread stacks, loaded classes, native libraries, etc.
2. Why have you allocated 1024 MB to the JVM heap? Did you choose any random number (obviously with some degree of educated guess)?
Your array size is 10000 * 8000 = 8 * 10^7
Thus total heap memory required = 8 * 10^7 * 4 Bytes [The int data type is a 32-bit signed two's complement integer]
= 320 * 10^6 Bytes
= 320 MBExcept that peterdog1234 said that the array was an array of doubles, at 8 bytes each, so about 640MB are needed for the array. If the algorithms allow the loss of range and precision, maybe the array could be an array of floats, not doubles. That would keep the array in about 320MB. That would help with the space requirements, but might be slower as all the operations will have to expand the floats to be operated on as doubles, then converted back to floats for storage in the array. But on some architectures that's not too bad.
I would use -XX:+PrintGCDetails to see how the heap has been partitioned into young generation (fast allocation and collection) and old generation (relatively long-lived data). You might have to reshape the heap to have at least 640MB in the old generation, and then whatever you can fit as the young generation, leaving some of your 1GB for the rest of the JVM, other programs running on the box, the operating system, etc. Maybe "-Xms768m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m" would be a good compromise. That gives you a 768MB Java object heap, with 64MB in the young generation and 704MB in the old generation, leaving 256MB (1GB-768MB) for "other things". Whether that works depends on now many other long-lived Java objects you have. But -XX:+PrintGCDetails will tell you that, too.

Similar Messages

  • Safari crashes when opening a very large pdf

    I have a 1st generation ipad running 4.3.5.
    Everytime I try to download a very large pdf in Safari ie. 175+ megs in gets about three quarters of the way through then Safari crashes and loose my progress. I will then restart Safari and the process restarts and crashes again.
    I've set auto-lock to never but that didn't help. Any ideas how to get Safari to download this file.
    ps I've considered other methods of getting the pdf but for this project I have to download it from a web site.
    Thanks for any help.

    Other apps can download PDFs - I don't know whether it can cope with a 175 meg download, but GoodReader can download files : http://www.goodreader.net/gr-man-tr-web.html

  • Osb proxy service with owsm policy auth slow when soap request very large

    I have a proxy service which is security with owsm policy: oracle/wss_username_token_service_policy, the proxy service simply route to Business Service which directly invoke a bpel exposed web service, when I call the proxy service with soap envelope large than 15MB(not attachment), waiting about 4~5 minutes, the bpel instance created ; but when I remove the security policy:oracle/wss_username_token_service_policy, it will cost only 20 seconds, why authentication cost so long? How can I deal with the problem?
    My English is poor, please don't mind!
    besides, with my OSB version is 11.1.1.6.0

    I finally figured it out. The nullpointer exception is related to the SAML assertion. The SAML assertion in my requests is signed with embedded signature and this seems to be not supported with the used OWSM policy. Without the signature is the exception gone.
    Marian

  • I have very large file sizes for some documents.

    Some of my documents are 5000 KB up to 7000 KB. Most of them are around 200-300 KB. I have a lot of graphics, but they are linked (not embedded). These graphics average about 25-60 KB in size. Even if I had 20 graphics, that would still not account for the large size..would it???
    Does anyone have an idea how to minimize these files sizes?
    I am using FrameMaker 11.
    Thanks

    > ... I have NO idea what you are saying ...
    Save the document in MIF format to a .mif file.
    Open the .mif with a plain text editor (Notepad will do).
    Look at typical MIF markup on the first several pages. It will be short lines of simple words and numbers like:
    #    Document Dictionary
    #    Variables
    <Units Uin>
    <CharUnits CUpt>
    <ColorCatalog 
    < Color  
    <  ColorTag `Black'>
      <  ColorCyan  0.000000>
      <  ColorMagenta  0.000000>
      <  ColorYellow  0.000000>
    <  ColorBlack  100.000000>
      <  ColorAttribute ColorIsBlack>
    Search for "<DocFileInfo"
    The next block of lines represent a binary data object in the document that is encoded as hexadecimal text in the MIF. In a document using only Import-by-Reference for external objects, that should be the only instance of such a block:
    <DocFileInfo
    3C3F787061636B657420626567696E3D27EFBBBF272069643D2757354D304D7043656869487A7265537A4E5463 7A6B633964273F3E0A3C783A7861706D65746120786D6C6E733A783D2761646F62653A6E733A6D6574612F2720 783A786170746B3D27584D5020746F6F6C6B697420322E382E312D
    32382C206672616D65776F726B20312E35273E0A3C7264663A52444620786D6C6E733A7264663D27687474703A 2F2F7777772E77332E6F72672F313939392F30322F32322D7264662D73796E7461782D6E73232720786D6C6E73 3A69583D27687474703A2F2F6E732E61646F62652E636F6D2F6958
    Scroll through the file looking for other such blocks. For example, a screenshot pasted into an anchored frame might appear as:
    =DIB
    &%v
    &BMFF1\x00000000003600000028000000970300009204000001001800000000001046310000000000
    &0000000000000000000000009C14008C10008C10008C10008C10008C10008C10008C10008C10008C
    &10008C10008C10008C10008C10008C10008C10008C10008C10008C10008C10008C10008C10008C10
    &008C10008C10008C10008C10008C10008C10008C10008C10008C10008C10008C10008C10008C1000
    And in that test I just ran, including a 1920x1280 color screenshot exploded the size of the .fm file from 300kB to 3.5Mb.

  • HT4356 Pages printed from Notes to air printer have very large font and no margins

    How can i reduce the size of the print when printing from Ipad "Notes" to an air printer.  I can only find a way to increase the font but not decrease it.  Also how can I adjust the margins

    Same here. Best to put the notes/copy them into something like the Pages app (for a small cost) or email them from the Notes app to a proper computer with good word processing programmes.

  • Some apps have very large font

    I have windows 10 Tech Preview Build 10041 and the mail and people and calendar apps are looking to be too much zoomed.  And I am not being able to change my account in mail and view dates after 27 of any month. Please help.

    AN
    It is a known issue in both 10041 & 100049.  Microsoft is aware of it but there is not ETA on a fix.
    Wanikiya and Dyami--Team Zigzag

  • Have a very large text file, and need to read lines in the middle.

    I have very large txt files (around several hundred megabytes), and I want to be able to skip and read specific lines. More specifically, say the file looks like:
    scan 1
    scan 2
    scan 3
    scan 100,000
    I want to be able to skip move the filereader immediately to scan 50,000, rather than having to read through scan 1-49,999.
    Thanks for any help.

    If the lines are all different lengths (as in your example) then there is nothing you can do except to read and ignore the lines you want to skip over.
    If you are going to be doing this repeatedly, you should consider reformatting those text files into something that supports random access.

  • Receiving very large amounts of data via ibrd in Visual Basic

    I am trying to read anything from a single byte up to 2Mb of data back into a Visual Basic program. Until now I have been using something like
    Dim Response as string * 60000
    ibrda hDevice, Response
    which works fine up to the magic 65536ish string size limit, but I want more!
    Ideally reading into a very large byte array would suffice, e.g.
    Dim ByteBuffer(0 To 2000000 - 1) As Byte
    ibrd hDevice, ByteBuffer
    But I cannot find a way to get the gpib-32.dll to accept the ByteBuffer as a destination in Visual Basic, even though ibrd32 is declared in vbib-32.bas as accepting Any type as a destination, and a Long as a count, implying the the 65536 limit doesn't apply for that call.
    It may be possibl
    e to use repeated ibrd calls until one such call fails to fill the buffer, concatenating the results each time, but this seems a crude solution when the DLL would appear to be able to do the job in one go.
    Using ibrdf may work, but would rather not use a file as intermediate storage.
    TIA

    I'm wondering if that # 65536 is a VB cap for string type. Refering to the lang intf,
    Declare Function ibrd32 Lib "Gpib-32.dll" Alias "ibrd" (ByVal ud As Long, sstr As Any, ByVal cnt As Long) As Long
    Sub ibrd(ByVal ud As Integer, buf As String) <---
    Dim cnt As Long
    cnt = CLng(Len(buf))
    Call ibrd32(ud, ByVal buf, cnt)
    isn't buf a string type?

  • Very large webpages turn into a black screen halfway down

    When reading a very large web document, it will suddenly turn black when scrolling down.
    If the page style is set to 'basic style', it shows this problem.
    If the page style is set to 'no style', the problem does not show.
    See attachments for above on test page - http://www.ralst.com/FriendMyFriend.HTM
    Tried with multiple themes, with no difference.

    I have the latest drivers.

  • Very Large Spacing Issue In Both Mail And Address Book!!

    Hello,
    I need your help to resolve this problem. Initially I had a problem with garbled font in my Mail application. I used FontNuke in an attempt to resolve the problem. The result of using FontNuke was that the font was un-garbled but now I have very large spacing in the Mail and Address Book applications. Also the circles on the left side of the Mail application (that normally indicate the number of unread messages you have) are also very large!! the same thing is happens with the red star on the Mail icon that indicates the number of unread messages you have.
    I would really appreciate any help that you can provide!
    Thanks,
    SydCam

    Thanks for following up so quickly. I took your advice and checked my fonts. I opened Font book and got rid of all the "duplicate" fonts and made sure that I had all of the required fonts. I then rebooted and when I went back to Mail and the Address Book, I still had the same problem. There are still very large spaces in my email both in the header and body. The circle to the left that indicates how many un-read email you have is still very large. It is over sized. I wish there was a way I could show you a screen capture so you can see what exactly what I'm referring to.
    Obviously there is something that I'm missing, but I just don't know what it is. I would greatly appreciate any help that you (or anyone else) can provide!
    Thanks in advance!
    SydCam

  • Is there a way to split a very large 1 page pdf into letter size multiple page pdf?

    I often have very large single page pdfs that need to be printed onto letter size paper.  Usually I don't have access to the printer where I'm working so I have to send the file to someone for printing. 
    I have AXI pro, they don't. 
    I want to make sure the job is printed as I specify and most of the users are using Reader.  So I want to give the someone the pdf ready to print sized in legal.  This requires manipulation of the pdf that I don't seem to be able to figure out how to do.
    In older versions of Acrobat, I could print to a new pdf and designate the page size.  Acrobat would create the multipage pdf.  The newer versions don't allow this. 
    With OSX 10.8 & AXI you can't save, export, split a one page (68" x 16") document into multiple page letter size (16 pages) pdf.
    Perhaps this can be done by printing to eps and running through distiller again or something else, but I'm stumped at the moment.
    Any suggestions of how to attach this would be appreciated.
    Thanks.

    That's a tough one. Acrobat is not designed for tiling PDF files to create another PDF. That's really what you're asking. There is the option to PRINT to a PDF, and turn on the Poster feature. If were in Windows where there is a real Adobe PDF printer driver, you could probably use that feature. But for various reasons (too complicated to describe here), that was withdrawn on the Macintosh.
    If you have a copy of Adobe InDesign, and if you installed an Adobe PDF 9 PPD file (see description below), it could be done in a somewhat awkward way. InDesign allows you to place PDF files so you would need to make a page of the proper size and place your large PDF:
    Then after installing the Adobe PDF 9 PPD file, you could choose File > Print. Then choose to print a PostScript file to the Adobe PDF 9.0 PPD file. In the Setup panel, you'd choose a Letter size page. Then you'd choose the Tile option at the bottom and set the Overlap amount:
    Then you'd save the PostScript file and process through Distiller.
    My blog post below describes how to find and install the Adobe PDF 9.0 PPD file:
    http://indesignsecrets.com/creating-postscript-files-in-snow-leopard-for-older-print-workf lows.php

  • Using SRM for very large contracts and contract management

    We are doing an SRM 7.01 implementation project. SRM will be used primarily for outsourced contract management. The contracts are all services associated with facilitites (plant) maintenance and also support services like cleaning or catering.
    They have very large numbers of items priced individually (e.g. 10,000) per contract. The items price depends on the location the work is expected to be performed. The location is represented in SAP RE-FX architectual object. The price can be priced at any level of the hierarchy e.g. service A is priced the same across the whole state but service B is priced per campus.
    q1. SAP advises that there are performance limitations on SRM contracts >2000 lines. Has anyone experience in a solution to provide very large contracts in SRM? How did you do it please?
    q2. SAP advises to use the plant to represent the location for pricing purposes, but this would result in a very large number of plants. Has any one experience in alternative solutions to for variable location pricing in SRM contracts please? I.e. like integrating the RE-FX architectural object or similar into contract and PO line items.
    thanks very much

    Hi Prakash,
    SRM does provide the facility of contract management with the help of Purchase Contracts and Global Outline Agreements but it is used as part of the sourcing for materials and services. The materials or services have contracts against some given target value against which PO is released. The contract is based on a material number ( eithe material or a service) which will be used as a source of supply during the creation of the Shopping Cart. It might not really fit in the scenario of carrier and freight forwarders but still can be customized for this kind of use.
    The contract management functionalities in the R/3 space can also be looked on for this purpose.
    Reg
    Sachin

  • Very Large Deployment Packages

    Hello,
    I have a couple ADRs for Updates that have very large deployment packages upwards of 12GB.  These ADR's are downloading many updates for many OSs and just keeps adding them to the deployment packages.  Is there a best practice on how to better
    manage updates using ADR's and there deployment packages?
    Thanks.
    Shawn

    Hi,
    1. Create a new software update group each time an automatic deployment and for general deployment.
    2. Use an existing software update group for automatic deployment rules for Endpoint Protection definition updates
    For more information:
    http://social.technet.microsoft.com/wiki/contents/articles/11215.system-center-2012-configuration-manager-best-practices.aspx#Best_Practices_for_Software_Updates
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I was recently sent a very large emoji message amd now when i try to acces messages it will not display mesagges and then will bring me back to the home page

    was recently sent a very large emoji message amd now when i try to acces messages it will not display mesagges and then will bring me back to the home page

    Quit the messages app and reset your phone.
    Go to the Home screen and double click the Home button. That will reveal the row of recently used apps at the bottom of the screen. Tap and hold on the app in question until it jiggles and displays a minus sign. Tap the minus sign to actually quit the app. Then tap anywhere on the screen above that bottom row to return the screen to normal. Then restart the app and see if it works normally. Then reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart.
    After the phone restarts go into Messages and delete the thread containing the problem message.

  • Today, I randomly happened to have less than 1GB of hard drive space left. I found very large "frame" files, what are they?

    I found very large "frame" files, what are they & can I delete them? (See screenshot). I'm a (17 today)-year-old film-maker and can't edit in FCP X anymore because I "don't have enough space". Every time I try to delete one, another identical file creates itself...
    If that can help: I just upgraded to FCP 10.0.4 and every time I launch it it asks to convert my current projects (I know it would do it at least once) and I accept, but everytime I have to get it done AGAIN. My computer is slower than ever and I have a deadline this friday
    I also just upgraded to Mac OS X 10.7.4, and the problem hasn't been here for long, so it may be linked...
    Please help me!
    Alex

    The first thing you should do is to back up your personal data. It is possible that your hard drive is failing. If you are using Time Machine, that part is already done.
    Then, I think it would be easiest to reformat the drive and restore. If you ARE using Time Machine, you can start up from your Leopard installation disc. At the first Installer screen, go up to the menu bar, and from the Utilities menu, first select to run Disk Utility. Completely erase the internal drive using the Erase tab; make sure you have the internal DRIVE (not the volume) selected in the sidebar, and make sure you are NOT erasing your Time Machine drive by mistake. After erasing, quit Disk Utility, and select the command to restore from backup from the same Utilities menu. Using that Time Machine volume restore utility, you can restore it to a time and date immediately before you went on vacation, when things were working.
    If you are not using Time Machine, you can erase and reinstall the OS (after you have backed up your personal data). After restarting from the new installation and installing all the updates using Software Update, you can restore your personal data from the backup you just made.

Maybe you are looking for