memory « error « Java I/O Q&A





1. Why am I getting this java.io.exception "Can't allocate memory" from Hudson?    stackoverflow.com

Here's what I believe to be the relevant error message:

Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "/var/lib/hudson/jobs/Goals/workspace"): java.io.IOException: error=12, Cannot allocate memory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:474)
   ...

2. OutOfMemory Exception - how does VisualVM help locate the memory leak with heapdump file?    stackoverflow.com

I've been testing my webapp locally on my pc and monitoring it with VisualVM. I recently also started using JMeter, as it was suggested that I should do some load testing ...

3. In Java, is there a way to randomize a file too large to fit into memory?    stackoverflow.com

What I would like to do is shuffle the rows (read from CSV), then print out the first randomized 10,000 rows to one csv and the remainder to a separate csv. ...

4. Out of Memory exception    coderanch.com

Hello all, I am using the following code to add a file to a jar. It works fine for smaller files, but if the file is over 56MB, it throws and out of memory exception. Any ideas on how I can keep this from happening? thanks, -Jason private File jarFile; private JarOutputStream jarOut; private FileOutputStream fileOut; jarFile = jarFile; fileOut = ...

5. java.io.IOException: Cannot allocate memory    coderanch.com

Hi, My program reads from the database and writes to a file. 1. I am running this on Weblogic 8.1 2. Linux OS. This program has worked many times before without throwing this exception and is also working now (without me making any changes) I would like to find the root cause of the problem to ensure that this exception is ...

6. Why "Out of Memory Errors" for this code?    coderanch.com

How could this code is executed as part of a thread run out of memory? Here is the info that I have. It runs as part of a thread. So I can see if too many threads are open at once. That is not the case. Also, before I added those close statements, we would see a message on Linux that ...

7. java.io.IOException : can't allocate memory    coderanch.com

Well, how much memory does the new process take, the one you're trying to exec()? And how much memory is available? If the new process is a big one, then you can get an error even though you seem to have free memory - if the amount of free memory is less than what the new process would require. The amount ...

9. StringBuilder out of memory error    coderanch.com

I'm going crazy because i'm getting the following error and i can't figure out why. java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572) at java.lang.StringBuilder.append(StringBuilder.java:203) at com.autonomy.ps.gs.IDOLListener.doPost(IDOLListener.java:37) my code is protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { StringBuilder sb = new StringBuilder(500); ServletInputStream is = request.getInputStream(); try { int i = is.read(); while (i != -1) ...





10. large file--> large string --> out of memory exception    forums.oracle.com

Hi all, i'm reading an extremely large file using a byte[] of size around 1000000bytes, whenever i read a chunk from this file, i have to extract some information for indexing this file. when i try to convert this byte[] to a string to search for the info i need, i get out of memory exception, any idea how can i ...

11. 'Out of memory' error while parsing huge number of files on unix platform    forums.oracle.com

Hi all, I got a 'Out of memory' error while parsing huge number of files lets say more than 3000 and of total size more than 100Gb on unix platform. What i was doing is:- 1. Getting childFiles(around 3K) of the parent folder. 2. Want to see the file extension of each file. and process only needed. (1 out of 3 ...

12. out of memory error - from parsing a "fixed width file"    forums.oracle.com

It's not immediately obvious where the memory leak is coming from. I'm looking for code that creates large numbers of objects that are immediately available for Garbage Collection, but I don't see anything that screams at me. I solve these problems with the profiler. Run the code in your profiler, and watch the memory usage as you step through your program. ...