Results 1 to 2 of 2

Thread: Java heap space

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default Java heap space

    Hello,
    i write a program that creates many hashTable; it counts the frequency of each word in some document s(that it's very large). So there are many words... This is a part of code. Do you know how come overcome this problem (in general) ?

    thanks
    Qt Code:
    1. ..............................
    2. HashMap<String, Double> frequency = null;
    3. for (every document ) {
    4. frequency = new HashMap<String, Double>();
    5. //select a word and count
    6. frequecny.put( myWord , new Integer (count ) );
    7. }
    8. .................................................................
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    2. at java.util.HashMap.resize(Unknown Source)
    3. at java.util.HashMap.addEntry(Unknown Source)
    4. at java.util.HashMap.put(Unknown Source)
    5. at MyClass.setting(MyClass.java:71)
    6. at filter.main(filter.java:19)
    To copy to clipboard, switch view to plain text mode 
    Last edited by mickey; 15th December 2008 at 20:15.
    Regards

Similar Threads

  1. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 9th March 2006, 00:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.