Use Of Interface(Memory Consume)
I have a doubt
//Interface A
code:
interface A{
public void add();
public void sub();
public void multiplication();
//Class B that Implements A
class B implements A{
public void add(){
int a=30;
int b=40;
int c=a+b;
System.out.println("The result of Addition is:-"c);
public void sub(){
int a=80;
int b=40;
int c=a-b;
System.out.println("The result of Substraction is:-"c);
public void multiplication(){
int a=80;
int b=40;
int c=a*b;
System.out.println("The result of Multiplication is:-"c);
public void division(){
int a=80;
int b=40;
int c=a/b;
System.out.println("The result of Division is:-"c);
//Anaother class C that use B's method
class C{
public static void main(String[]args){
//what is the differnce
//I have a doubt why we use this line
A a=new B();
a.add();
B b=new B();
b.add();
I have a doubt,In class C I am accessing the B's add()through 2 referance variables one is class type and another is interface type.ok
My doubt is what's the differance?
which is adviceable to use?
if Interface reference is advisable,weather it will allocate memory at runtime or compile time?
a class variable will allocate memory at runtime or compile time?
thanks
Biswo
Edited by: Biswo on Dec 3, 2008 8:29 AM
Biswo wrote:
My doubt is what's the differance?
which is adviceable to use?They're equivalent from a performance standpoint so it boils down to whether you want the reference variable to be of type A or B, which is a design consideration.
In both cases the B object is allocated at runtime and the add method is bound at runtime.
The Java language is very efficiently implemented so you don't have to worry about things like this. Concentrate on proper design instead.
Similar Messages
-
XML,CLOB AND MEMORY : CONSUMED BUT NOT RELEASED !!!
Hi,
I'm working with XMLGEN Package and XSLT Processor to produce XML Document on Oracle 8.1.7.3 server, I use 9i XML and Java packages.
I'm facing the following BIG MEMORY problem :
Environment : I must generate an XML parsed with an XSL document of 80Mo (nearly 22 000 rows),
as XMLGEN is on DOM parsing method, I extract my XML by 500 Rows and I loop until 22 000 rows. I use DBMS_JOB with jobs who read and execute export each minute.
The algorithme is :
keeprow=22000
while keeprow>0
Create 3 clob (DBMS_LOB Package) : one for XSL Sheet, one for XML and one for result
GetXML (XMLGEN Package)
Transform in XSL (XSL Processor)
Write to disk (UTL_FILE Package)
Free the 3 Clob ((DBMS_LOB Package))
keeprow =keeprow-500
loop
The problem : The process start at 250Mo ot total memory and END at 1000 Mo of used memory and NEVER RELEASE 1 ko of memory.
So often I get a JavaOutOfMemoryError (I've allocated 1Go Ram to my JAVA process).
Any help will be very very appreciated !
My derived problem is 22 000 rows is not enough I've some export of 200 000 rows to do (And I cannot allocate 10 Go of RAM !!!)
Following My PL/SQL Code.
Regards
Fred
PROCEDURE DO_EXPORT_XML(
P_JOB_ID JOB_PARAMETRE.JOB_ID%TYPE,
P_JOB_ID_ORDRE JOB_PARAMETRE.JOB_ID_ORDRE%TYPE,
P_CLE_UP UPLOADREQ_TEMP.ID%TYPE,
P_LOAD_OR_DELOAD VARCHAR2)
IS
L_FILE_NAME JOB_PARAMETRE.JOB_FILE_NAME_DEST%TYPE;
L_REP_NAME JOB_PARAMETRE.JOB_REP_NAME_DEST%TYPE;
L_FILE_STYLESHEET JOB_PARAMETRE.JOB_STYLESHEET%TYPE;
L_VERSION_PDM JOB_PARAMETRE.JOB_VPDM%TYPE;
P_SELECT varchar2(4000):='';
P_CURSOR varchar2(4000):='';
l_filehandler_out UTL_FILE.FILE_TYPE;
--Variable pour le traitement par lot de 500
L_NBROW_TODO_ATONCE number := 500;
L_NBROW_MIN number := 1;
L_NBROW_MAX number := -1;
L_NBROWKEEPTODO number := -1;
xslString CLOB := null;
res number default -1;
xmlString CLOB := null;
li_ret number := 0;
li_faitle number := 0;
amount integer:= 255;
li_loop integer := 0;
charString varchar2(255);
ls_deload varchar2(255) default '';
ls_SQL varchar2(4000) default '';
ls_temp_file varchar2(255) default '';
text_file_dir varchar2(32) := 'e:\temporarydir';
l_par xmlparser.parser;
l_xml xmldom.domdocument;
l_pro xslprocessor.processor;
l_xsl xslprocessor.stylesheet;
docfragnode xmldom.DOMNode;
docfrag xmldom.DOMDocumentFragment;
l_parsedclob clob := null;
l_amount binary_integer := 32767;
l_ligne varchar2(32767);
l_offset number default 1;
l_pos number default null;
l_pos2 number default null;
l_lobsize number default null;
l_memsize number default 1073741824; --1024 Mo
l_mempipo number default 0;
type rc is ref cursor;
l_cursor rc;
cursor TEMPLATE is select UNSPSC,1 as NB from UPLOADREQ_TEMP where 1=2;
c1rec TEMPLATE%rowtype;
BEGIN
l_mempipo:=setmaxmemorysize(l_memsize);
dbms_lob.createtemporary(l_parsedclob, true, dbms_lob.session);
dbms_lob.createtemporary(xmlstring, true, dbms_lob.session);
--return the good select
GET_SELECT_TO_EXPORT_XML(P_JOB_ID , P_JOB_ID_ORDRE , P_CLE_UP , P_SELECT,P_CURSOR, P_LOAD_OR_DELOAD);
SELECT JOB_FILE_NAME_DEST,JOB_REP_NAME_DEST,JOB_STYLESHEET
INTO L_FILE_NAME,L_REP_NAME,L_FILE_STYLESHEET
FROM JOB_PARAMETRE
WHERE JOB_ID =P_JOB_ID AND JOB_ID_ORDRE=P_JOB_ID_ORDRE;
l_filehandler_out := UTL_FILE.FOPEN(text_file_dir, L_FILE_NAME, 'w',l_amount);
--Return XSL Sheet in a clob : cause of memory consumed but not released
xslString := METACAT.load_a_file( 1,L_FILE_STYLESHEET);
open l_cursor for P_CURSOR;
LOOP
fetch l_cursor into c1rec;
exit when l_cursor%notfound;
L_NBROW_MIN := 1;
L_NBROW_MAX := 0;
L_NBROWKEEPTODO:=c1rec.NB;
LOOP
begin
if(L_NBROWKEEPTODO > L_NBROW_TODO_ATONCE) THEN
begin
L_NBROW_MAX:= L_NBROW_TODO_ATONCE + L_NBROW_MAX;
L_NBROWKEEPTODO:= L_NBROWKEEPTODO - L_NBROW_TODO_ATONCE;
end;
else
begin
L_NBROW_MAX:= L_NBROW_MAX + L_NBROWKEEPTODO;
L_NBROWKEEPTODO:=0;
end;
end if;
--on ouvre le fichier de risultats
ls_SQL:= P_SELECT || ' AND ( ROWNUM BETWEEN ' || L_NBROW_MIN || ' AND ' || L_NBROW_MAX || ' ) and UNSPSC=''' || c1rec.UNSPSC || '''';
ls_temp_file := c1rec.UNSPSC || '_' || L_FILE_NAME;
L_NBROW_MIN:=L_NBROW_TODO_ATONCE + L_NBROW_MIN;
--CAT_AUTOLOAD.JOB_ADD_TRACE (P_JOB_ID,'UPLOAD REQUISITE : Export donnies REQUETE ' || to_char(li_loop), ls_SQL,'',0,0);
xmlgen.resetOptions;
xmlgen.setErrorTag('ERROR_RESULT');
xmlgen.setRowIdAttrName('NAH');
xmlgen.setRowIdColumn('NAH');
xmlgen.setEncodingTag('ISO-8859-1');
xmlgen.useNullAttributeIndicator(false);
if(xmlString is not null) then
dbms_lob.open(xmlString,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(xmlString);
if(l_lobsize>0) then
dbms_lob.erase(xmlString,l_lobsize,1);
end if;
dbms_lob.close(xmlString);
dbms_lob.freetemporary(xmlString);
dbms_lob.createtemporary(xmlstring, true, dbms_lob.session);
end if;
--Return XML in a clob : cause of memory consumed but not released
xmlString := xmlgen.getXML(ls_SQL,0);
l_par := xmlparser.newparser;
xmlparser.parseclob(l_par, xslString);
l_xsl := xslprocessor.newstylesheet(xmlparser.getdocument(l_par),null);
xmlparser.parseclob(l_par, xmlString);
l_xml := xmlparser.getdocument(l_par);
l_pro := xslprocessor.newprocessor;
xslprocessor.showWarnings(l_pro, true);
xslprocessor.setErrorLog(l_pro, text_file_dir || substr(ls_temp_file,0,length(ls_temp_file)-4) || '_logerreur.XML');
if(l_parsedclob is not null) then
dbms_lob.open(l_parsedclob,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(l_parsedclob);
if(l_lobsize>0) then
dbms_lob.erase(l_parsedclob,l_lobsize,1);
end if;
dbms_lob.close(l_parsedclob);
dbms_lob.freetemporary(l_parsedclob);
dbms_lob.createtemporary(l_parsedclob, true, dbms_lob.session);
end if;
--Return XML Processed with XSL in a clob : cause of memory consumed but not released
xslprocessor.processxsl(l_pro,l_xsl,l_xml,l_parsedclob);
--release NOTHING
xmlparser.freeparser(l_par);
xslprocessor.freeprocessor(l_pro);
l_ligne:='';
l_offset :=1;
l_pos := null;
l_pos2 := null;
if(li_loop=0) then
begin
--on ouvre le fichier et on sauve l'entete + les donnies dedans.
l_pos:=dbms_lob.instr(l_parsedclob,'</DATA>');
if ( nvl(l_pos,0) > 0 ) then
loop
if(l_pos-1>l_amount + l_offset ) then
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_amount,l_offset);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
l_offset:=l_offset+l_amount;
else
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_pos-1 -l_offset ,l_offset);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
exit;
end if;
end loop;
else
EXIT;
end if;
end;
else
--on met les donnies donc on ne repete pas le debut
begin
l_pos:=dbms_lob.instr(l_parsedclob,'<ITEM');
if ( nvl(l_pos,0) > 0 ) then
l_pos2:=dbms_lob.instr(l_parsedclob,'</DATA>');
if ( nvl(l_pos2,0) > 0 ) then
loop
if(l_pos + l_amount <= l_pos2 -1 ) then
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_amount,l_pos);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
l_pos:=l_pos +l_amount;
else
l_ligne:=dbms_lob.SUBSTR(l_parsedclob,l_pos2 -1 -l_pos,l_pos);
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.fflush(l_filehandler_out);
exit;
end if;
end loop;
else
exit;
end if;
end if;
end;
end if;
li_loop:=li_loop + 1 ;
--UTL_FILE.FCLOSE(l_filehandler_in);
JAVA_GC();
EXIT WHEN L_NBROWKEEPTODO=0;
Exception
when others then
begin
-- IF(utl_file.is_open(l_filehandler_in)) THEN
-- utl_file.fclose( l_filehandler_in);
-- END IF;
IF(utl_file.is_open(l_filehandler_out)) THEN
utl_file.fclose( l_filehandler_out);
END IF;
RAISE_APPLICATION_ERROR(-20001,'File with errors');
end;
END;
END LOOP;
END LOOP;
CLOSE l_cursor;
if ( xmlString is not null ) then
dbms_lob.open(xmlString,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(xmlString);
if(l_lobsize>0) then
dbms_lob.erase(xmlString,l_lobsize,1);
end if;
dbms_lob.close(xmlString);
dbms_lob.freeTemporary( xmlString);
end if;
if(l_parsedclob is not null) then
dbms_lob.open(l_parsedclob,dbms_lob.lob_readwrite);
l_lobsize:= dbms_lob.Getlength(l_parsedclob);
if(l_lobsize>0) then
dbms_lob.erase(l_parsedclob,l_lobsize,1);
end if;
dbms_lob.close(l_parsedclob);
dbms_lob.freetemporary(l_parsedclob);
end if;
UTL_FILE.NEW_LINE(l_filehandler_out);
l_ligne:='</DATA></CATALOG>';
UTL_FILE.PUT(l_filehandler_out,l_ligne);
UTL_FILE.FCLOSE(l_filehandler_out);
EXCEPTION
when others then
begin
IF(utl_file.is_open(l_filehandler_out)) THEN
utl_file.fclose( l_filehandler_out);
END IF;
end;
END;
******************************Thank you for the info - I had no idea I was puing myself in danger by cutting it so close. Since your post I have moved my iphoto library to an external drive and now have 165 GB of space on my HD. Following this I have 2 questions.
1. Since my available HD space was reduced by the size of the photo download it seems logical that the download is somewhere on my HD still. Is there a place where these photos might be hiding on my HD even though they are not available on the iphoto library?
2. I was able to recover the .jpg files which are fine. I also recovered the .mov files but they have been compromised. I am hoping I can find the originals still on the HD somewhere. If not, do you have any suggestions for recovery methods or programs? I have not used the SD card since the incident so I should be able to attempt another recovery to salvage the .mov files if there is an alternative method/program available.
Thanks again! -
BLOB column will caused large memory consumed ?
our appliation server is AS9.0.4 and
We using this Jdev 10g with BC4J and JSP
to build some application that contain blob column BC4J entity object, we found the blob column will caused the memory consumed issue , each time the contain blob column application page request by browser that will consume about 50M memory on OC4J component instance, and incremental by each request until the instance out of memory. It seems the garbage collection or memory leak problem ? or have another solution to avoid the memory problemI encountered a similar problem when I was retrieving BLOB files in the .NET architecture. I used chunking to solve the problem.
What happens is that the server reads the entire BLOB into memory before it sends anything to the client requesting it. So I set it up so that I would read a chunk (say 32KB) of the BLOB into a byte array, transmit it to the client, then read the next chunk from the BLOB and use it to overwrite the byte array, and so on. That way the maximum amount of memory that can be used is no greater than the size you specify for the chunk.
This will cause downloads to slow, but it's the only way I know of to avoid massive memory consumption. Sorry I don't have any code to go with this, but I've just started working with Java/Jdeveloper recently. Hope this helps. -
Hi
I had this problem one weak ago, I did all suggestion that this link said and it didn't help:
https://support.mozilla.org/ar/kb/firefox-uses-too-much-memory-ram#w_disabling-memory-consuming-plugins
I don't have many taps oppened only 47 taps.
My firefox now usiing 2GB ram, can anyone help me how to fix it?
Thank youHello,
Can you please follow the instructions in the ''Memory troubleshooting tools'' section of the [[Firefox uses too much memory (RAM) - How to fix]] support article and provide the about:memory section details in this ticket. We can take a look at it and suggest possible options.
Thank you -
NWMKDE using too much memory(abend)
Hello, I have a Netware 6.5 sp7 server with 4gb of RAM. It runs GW MTA, GWIA and WebAccess and NO Backup software. but lately, when I restart the server it reboots it self a couple of times and I notice memory allocation errors. When it comes up Java and apache won't load so I have to manually start it. I ran SEG and NWMKDE.NLM is using almost 800mb of RAM!! so I was thinking on set thinkingMergeSortBufferSize=0 to 307200 so it does not use up to 60% of total RAM. Is this correct? any ideas? can i set java or apache to use less memory?
Thank you in advanced
Ramirosegstats:
*** Memory Pool Configuration for : DRACO
Time and date : 08:14:25 AM 09/23/2010
Server version : NetWare 6.5 Support Pack 7
Server uptime : 3d 22h 52m 24s
SEG.NLM uptime : 0d 00h 00m 15s
SEG.NLM version : v2.00.17
Original Memory : 8,587,796,480 bytes (8.00 GB)
ESM Memory : 4,831,834,112 bytes (4.50 GB)
0xFFFFFFFF --------------------------------------------------------------
| Kernel Reserved Space |
| |
| Size : 180,355,071 bytes (172.0 MB) |
| |
0xF5400000 --------------------------------------------------------------
| User Address Space (L!=P) |
| |
| User Pool Size : 884,998,144 bytes (844.0 MB) |
| High Water Mark : 566,394,880 bytes (540.2 MB) |
| PM Pages In Use : 6,782,976 bytes (6.5 MB) |
| |
0xC0800000 --------------------------------------------------------------
| Virtual Memory Address Space (L!=P) |
| |
| VM Address Space : 2,155,872,256 bytes (2.01 GB) |
| Available : 1,380,769,792 bytes (1.29 GB) |
| Total VM Pages : 1,372,561,408 bytes (1.28 GB) |
| Free Clean VM : 1,336,213,504 bytes (1.24 GB) |
| Free Cache VM : 36,347,904 bytes (34.7 MB) |
| Total LP Pages : 0 bytes (0 KB) |
| Free Clean LP : 0 bytes (0 KB) |
| Free Cache LP : 0 bytes (0 KB) |
| Free Dirty : 0 bytes (0 KB) |
| NLM Memory In Use : 1,516,290,048 bytes (1.41 GB) |
| NLM/VM Memory : 1,433,575,424 bytes (1.34 GB) |
| Largest Segment : 1,871,872 bytes (1.8 MB) |
| Lowest Kernel Page: 0 bytes (0 KB) |
| : [0x00000000] |
| High Water Mark : 1,508,204,544 bytes (1.40 GB) |
| Alloc Failures : 7 |
| |
0x40000000 --------------------------------------------------------------
| File System Address Space (L==P or L!=P) |
| |
| FS Address Space : 1,067,356,160 bytes (1017.9 MB) |
| Available : 102,666,240 bytes (97.9 MB) |
| Largest Segment : 50,720,768 bytes (48.4 MB) |
| |
| NSS Memory (85%) : 577,921,024 bytes (551.1 MB) |
| NSS (avail cache) : 456,630,272 bytes (435.5 MB) |
| |
0x00617000 --------------------------------------------------------------
| DOS / SERVER.NLM |
| |
| Size : 6,385,664 bytes (6.1 MB) |
| |
0x00000000
Total NLMs loaded on the server: 407
Top 20 Memory Consuming NLMs
NLM Name Version Date Total NLM Memory
1. NWMKDE.NLM 7.94 11 Dec 2001 763,876,569 bytes (728.5 MB)
2. NSS.NLM 3.26 14 Sep 2007 216,267,856 bytes (206.2 MB)
3. SERVER.NLM 5.70.07 18 Sep 2007 133,066,656 bytes (126.9 MB)
4. DS.NLM 10553.73 9 Oct 2006 52,911,118 bytes (50.5 MB)
5. GWINTER.NLM 8.00.01 27 Sep 2009 42,430,898 bytes (40.5 MB)
6. APACHE2.NLM 2.00.59 13 Mar 2007 32,691,237 bytes (31.2 MB)
7. GWIA.NLM 8.00.01 7 Jan 2010 31,954,282 bytes (30.5 MB)
8. GWMTA.NLM 8.00.01 7 Jan 2010 20,291,671 bytes (19.4 MB)
9. APRLIB.NLM 0.09.12 13 Mar 2007 11,621,672 bytes (11.1 MB)
10. CIOS.NLM 1.60 10 Sep 2007 10,568,150 bytes (10.1 MB)
11. OWCIMOMD.NLM 3.01 19 Jul 2007 9,347,288 bytes (8.9 MB)
12. APACHE2.NLM 2.00.59 13 Mar 2007 7,705,637 bytes (7.3 MB)
13. GWENN5.NLM 8.00.01 7 Jan 2010 6,320,956 bytes (6.0 MB)
14. GWENN5.NLM 8.00.01 7 Jan 2010 6,308,668 bytes (6.0 MB)
15. GWENN5.NLM 8.00.01 7 Jan 2010 6,308,668 bytes (6.0 MB)
16. GWENN5.NLM 8.00.01 7 Jan 2010 6,308,668 bytes (6.0 MB)
17. GWENN5.NLM 8.00.01 7 Jan 2010 6,308,668 bytes (6.0 MB)
18. GWENN5.NLM 8.00.01 7 Jan 2010 6,308,668 bytes (6.0 MB)
19. FATFS.NLM 1.24 27 Aug 2007 5,830,741 bytes (5.6 MB)
20. WS2_32.NLM 6.24.01 14 Feb 2008 3,631,788 bytes (3.5 MB)
Top 20 NLM - Memory Trends
NLM Name Original Memory Current Change
================================================== ===============================
1. NWMKDE.NLM 763,876,569 bytes 763,876,569 bytes 0 KB
2. NSS.NLM 216,267,856 bytes 216,267,856 bytes 0 KB
3. SERVER.NLM 132,992,928 bytes 133,066,656 bytes 72 KB
4. DS.NLM 52,636,686 bytes 52,911,118 bytes 268 KB
5. GWINTER.NLM 42,430,898 bytes 42,430,898 bytes 0 KB
6. APACHE2.NLM 32,691,237 bytes 32,691,237 bytes 0 KB
7. GWIA.NLM 31,999,338 bytes 31,954,282 bytes -44 KB
8. GWMTA.NLM 20,267,095 bytes 20,291,671 bytes 24 KB
9. APRLIB.NLM 11,621,672 bytes 11,621,672 bytes 0 KB
10. CIOS.NLM 10,568,150 bytes 10,568,150 bytes 0 KB
11. OWCIMOMD.NLM 9,347,288 bytes 9,347,288 bytes 0 KB
12. APACHE2.NLM 7,705,637 bytes 7,705,637 bytes 0 KB
13. GWENN5.NLM 6,320,956 bytes 6,320,956 bytes 0 KB
14. GWENN5.NLM 6,308,668 bytes 6,308,668 bytes 0 KB
15. GWENN5.NLM 6,308,668 bytes 6,308,668 bytes 0 KB
16. GWENN5.NLM 6,308,668 bytes 6,308,668 bytes 0 KB
17. GWENN5.NLM 6,308,668 bytes 6,308,668 bytes 0 KB
18. GWENN5.NLM 6,308,668 bytes 6,308,668 bytes 0 KB
19. FATFS.NLM 5,830,741 bytes 5,830,741 bytes 0 KB
20. WS2_32.NLM 3,631,788 bytes 3,631,788 bytes 0 KB
Logical Memory Summary Information
================================================== =============================== -
How can i use the onboard memory from NI6534
I want to use the onboard memory of PCI 6534,but i don´t how can i put my data on this memory? are there function or command for that?
thank you.
ArmandArmand,
Please reference the User Manual for the PCI-6534. Specifically, pages 2-10 and 2-22 in the Continuous Output sections explain how to leverage the onboard memory using either LabVIEW or the NI-DAQ C interface. For LabVIEW you will set the Pattern Generation Loop Enable attribute to ON in the DIO Parameter VI.
653X User Manual
http://digital.ni.com/manuals.nsf/websearch/EDE443F5C700373A862569B90072D26F?OpenDocument&node=4575_US
Regards,
Justin Britten
Applications Engineer
National Instruments -
Why does the JRE use so much memory?
I know this question has been asked a million times in one form or another but I have not seen a complete answer yet. When I compile and run the following code under WindowsXP pro, it appears that the JRE is using 3.1MB or RAM. When I run a similar program using C++ the program only uses 630k.
public class HelloWorld
public static void main(String args[])
System.out.println("Hello World");
Why 3MB to show "HelloWorld"? I love Java, it is much easier and more enjoyable to develop with but our applications appear to use large amounts of memory. I realize that making calls to the runtime object to check the amount of "heap" memory we are using will probably show much less memory being used but Task Manager shows 3MB. It is sometimes hard to convince my fellow developers of he benefits of Java when there are strange issues like this.
Thanks in advanceJava uses that much memory because every time you start a Java program, even this small, it loads into RAM the whole Java Virtual Machine. Which is itself a very large C++ program - on the order of several hundred thousand lines. Compare that to your C++ HelloWorld program - and you see the reason for a difference...
So a real question is, is it possible to write a modern Java VM such that it uses space proportional to the size/complexity of the Java program that it executes. Partially that's possible - for example I understand that say native GUI libraries are separate from the main JVM dll, so when you don't use AWT/Swing, you don't waste space with related native code. However, for the core JVM it's probably very difficult to separate parts of functionality such as the interpreter, the dynamic compiler, the runtime system, the garbage collector, the serviceability stuff, etc. They are very interdependent, and thus, probably unless you have this goal from the beginning (and ready to sacrifice some performance/maintainability for it), you can't do that.
There exist, however, a bunch of other JVMs of all sizes, say those used in mobile phones (or even smart cards!), that consume a lot less memory. They, however, typically implement only a subset of the full Java functionality. On the other hand, the HotSpot VM that comes with Sun's JDK, that you probably use, is a full-fledged JVM that implements everything, can be used for huge server apps, etc. - no wonder its minimum memory consumption is a few megs. -
Linux command/shell script to find Memory consumed by JVM in EBS,SOA
Hi All,
Could anyone please let me know the following:
a)Linux command/shell script to find Memory consumed by JVM for every 1 minute frequency interval in EBS R12, SOA suite
b)Percentage of the Heap memory usage by the JVM for every 1 minute frequency interval in EBS R12, SOA suite
Thanks for your time!
Regards,user10088255 wrote:
Hi All,
Could anyone please let me know the following:
a)Linux command/shell script to find Memory consumed by JVM for every 1 minute frequency interval in EBS R12, SOA suite
b)Percentage of the Heap memory usage by the JVM for every 1 minute frequency interval in EBS R12, SOA suite
Thanks for your time!
Regards,Please see these docs.
JVM: Guidelines to setup the Java Virtual Machine in Apps Ebusiness Suite 11i and R12 [ID 362851.1]
Generate JVM heap dump in E-Business suite 11i and R12 [ID 462550.1]
11i: How To Use Jconsole to Monitor JVM with Oracle E-Business Suite 11i [ID 415455.1]
Configuring various JVM tuning parameters for Oracle E-Business suite 11i and R12 [ID 567551.1]
Script to find Apache, Java, Jinitiator, Forms version and JVM details for Oracle E-Business Suite 11i [ID 466890.1]
JVM Memory Monitoring, Tuning, Garbage Collection, Out of Memory, and Heap Dump Analysis For SOA Suite Integration 11g [ID 1358719.1]
How to Perform Memory and Thread Analysis on SOA [ID 1450293.1]
Thanks,
Hussein -
Using 7GB of memory on startup with no apps running
I have a 2009 macbook 13inch with 1TB HDD and 8GB Ram running yosemite, mavericks before it, and mavericks was not better or worse
it is constantly running out of memory
i have "memory clean" running (which is insanely good and free) so it flushes it out otherwise it would be unusable
when i start up it is using 7GB of memory, sometime a wee bit less but not much
the 2 biggest offenders are "backupd" and "kernel" processes. you see them in activity monitor
kernel is kind of fundamental and i believe that backupd is time machine
i killed backupd and now i have 4.25GB of memory used with only iTunes and safari open (1 tab - this one)
there are well over 100 process running just from startup probably closer to 150
cpu is using less than 15%
i have 160GB free on my HDD
so what is occurring? and how do i get it to behave like a normal macbook?
if your response starts with "i don't know, but". or any derivation there of, please stop typing and go a help an old person across the road :-)Perhaps the CPU is stuck running cycles, trying to figure out how to restore
all those Caches and other important stuff you've used some third-party
unnecessary software to delete? By pre-loading many simple OS X tasks,
the system does well enough to take on chores for daily use on its own.
Has the Console utility's system logs shed some light on how this RAM is
being used? What of the limited info in Activity Monitor, which is less open
about where these resources have gone, than previous OS X versions?
You may see about some command-line interface sleuthing to get into OS X
underpinnings to check; there are several items in OS X Developer library
to read up on. Helpful if you have more than one Mac and have a viable 2nd
computer not running the latest OS X just in case a new upgrade isn't a good
way to go just yet. Not all computer models appreciate a newest system install.
{If you have a backup from before the last upgrade of OS X, that may be an
idea to revert to that; a full system clone on external drive, a bootable copy,
is helpful to restore previous system function, or to offer a way back.}
Sometimes the system log files can help illuminate issues such as kernel
problems, and other hung processes that may hog CPU cycles, & RAM.
What brand of 'clean' have you been submitting your OS X hidden parts, to?
Some do more than clean, they toss out vital system parts & essential caches.
Maybe someone with command-line experience such as Linc Davis could
help you, if he sees your thread. If so, there are tedious testing intervals to
see what is going on; not necessarily to cure the issue but to outline a cause.
Diagnostic testing may be required to see if there are any hardware causes
to the symptoms; but a new installation may help. If the problems have been
saved in a Time Machine backup, then be aware you can re-introduce them
from there should you rely on that to restore your current system & files.
There are a few good ideas among these Guide pages to review:
http://www.thesafemac.com/tech-guides/
Are there excessive items in your startup files, and other extensions installed
that could account for wasted RAM and system resources? You may wish to
check that out and delete or disable those.
In any event...
Good luck & happy computing! -
I want to ask something about firefox.
why firefox use very much memory?
can you develop to reduce memory comsume?
this problem is very distrub in my PC with low memory.
== This happened ==
Every time Firefox openedHow much memory is Firefox using right now?
# Press '''CTRL+SHIFT+ESC''' to load the Task Manager window
# Click the Processes tab at the top. (Click once near the top of the window if you don't see tab
# Find firefox.exe, and see how many kilobytes of memory it's using.
Showing around 80MB when Firefox first starts is normal. Right now, I have 75 tabs open and it's using 500MB - this varies a lot depending on what you have in the tabs.
Other than high memory usage, what other problems are you experiencing? (Examples include slowness, high CPU usage, and failure to load certain sites)
Many of these issues, including high memory usage, can be caused by misbehaving add-ons. To see if this is the case, try the steps at [[Troubleshooting extensions and themes]]. Outdated plugins are another cause of this issue - you can check for this at http://www.mozilla.com/plugincheck -
Editing the Customer Address using Open Interface
Hi All,
The requirement is to edit the address details(postal codes) of the customer using Open Interface and not the APIs.
They are insisting on using open interface as the Vertex validation(Taxation rules) is taken care only by Open Interface.
Will need help on this.Kindly advice.Please refer the following whitepaper
https://metalink2.oracle.com/cgi-bin/cr/getfile.cgi?p_attid=67196.1:1
Thanks,
Anil -
Populating the Addressee field using Customer Interface program
Hello All,
Can any body tell me how to populate the "Addressee" column in the HZ_Party_Sites table using Customer Interface Program. Which field should be populated in RA_Customers_Interface_All table inorder to populate the "Addressee" field.
Thank you,
VijayYou can post this thread in this
Customers as well.
Thanks
GM -
Can i use one interface to load data into 2 different tables
Hi Folks,
Can i use one interface to load data into 2 different tables(same schema or different schemas) from one source table with same structure ?
Please give me advice
Thanks
Raj
Edited by: user11410176 on Oct 21, 2009 9:55 AMHi Lucky,
Thanks for your reply,
What iam trying is ...Iam trying to load the data from legacy tables(3) into oracle staging tables.But i need to load the same source data into two staging tables(these staging tables are in two different schemas)
can i load this source data into two staging tables by using single standard interface(some business logic is there)
If i can then give me some suggestion how to do that
Thanks in advance
Raj -
How to use multiple Interfaces for the same BS?
Hi @ ,
Is it possible to have a scenarion where i am using multiple interfaces in the same BS based upon some conditional field in the message.
I amnot able to get the solution I know with condition editor I can have multiple receivers but in my scenarion based upon message fiels i have to decide which BAPI to be used and wht mapping and then post it to the same System
Any help will be highly rewarded
RegardsHi-
Yes it is possible you can use multimapping for mapping the interfaces.
To know more about multimapping see
http://help.sap.com/saphelp_nw04/helpdata/en/21/6faf35c2d74295a3cb97f6f3ccf43c/content.htm
Some more helpful links
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible -
Is there a way to run an existing PS-JS script using external interface
I have several previously written Photoshop JS scripts which I'd like to run through buttons on PS panels, much like the example for the HelloWorld introduction. I assume that--using external interface--I'll somehow be able to fire off these script files. Is this a correct assumption?
Thanks!Certainly, but not with external interface.
Have a look at the cookbooks. There are examples of how to use the root host object to call directly into extendscript.
Maybe you are looking for
-
How to install SQL server 2008 express on Windows server 2008 R2 standard OS
Hi, I have Windows server 2008 R2 Standard edition (64-bit) and trying to install SQL server 2008 express edition since I do not have SQL server 2008. When I install it I am unable to see Management Studio so I am trying to install management studio
-
I have a wireless modem/router and want to use my airport extreme to strengthen the signal throughout my house...how do i do that?
-
How do I turn on the GUI controls for the Focus Blur Effect in Final Cut Pro X
I can't find the setting that enables the GUI control overlay to manipulate the parameters of the Focus blur effect in Final Cut Pro X. When I have the clip and the focus effect selected I only get a center element overlay. At one point I had control
-
Preview won't open...
Hi, Preview just flashes in the doc for a second and then doesn't open. I've tried deleting the preference files in the user library and restarting, and I've also tried copying preview. Does anyone have any other ideas that coul work? Are there any p
-
How to cancel upgrade of icloud storage?
Hi I upgraded from the 5 gb of storage to the 10 gb a year and do not need this- how can i cancel it? thanks