Results 1 to 2 of 2
Thread: Consumption of memory
- 06-25-2007, 04:31 AM #1
Member
- Join Date
- Jun 2007
- Posts
- 91
- Rep Power
- 0
Consumption of memory
I want to measure the consumption of memory that implies certain action (upload a pdf with the library pdfbox), with the purpose of to determine in approximate form (to know if it puts all the pdf in single memory or the structure of this).
Last edited by Daniel; 07-06-2007 at 09:09 PM.
- 07-06-2007, 09:11 PM #2
Senior Member
- Join Date
- Jun 2007
- Posts
- 111
- Rep Power
- 0
Try something like that:
Java Code:System.out.println(Runtime.getRuntime().freeMemory()); long memoryBefore = Runtime.getRuntime().freeMemory(); PDDocument document = PDDocument.load("c:\\01.pdf"); long memoryAfter = Runtime.getRuntime().freeMemory(); System.out.println( (memoryBefore -long memoryAfter));
Similar Threads
-
Low memory error
By rlhs76 in forum New To JavaReplies: 2Last Post: 02-08-2008, 10:25 PM -
Out of memory
By mew in forum New To JavaReplies: 1Last Post: 01-20-2008, 08:55 AM -
Memory leakage problem
By Amali_Prem in forum New To JavaReplies: 0Last Post: 01-17-2008, 10:45 AM -
Memory
By mew in forum CLDC and MIDPReplies: 0Last Post: 12-28-2007, 11:02 AM -
How Can I get free memory ?
By sathish_2111 in forum NetworkingReplies: 2Last Post: 07-19-2007, 04:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks