Jvm implementation

does jvm translate the java class byte code into assembly code?

Java Virtual Machine
The Java Virtual Machine is key to the independence of the underlying operating system and hardware-it is a platform that hides the underlying operating system from Java-powered applets and applications. And it's very easy to port the Virtual Machine to a browser or another operating system.
In addition, the Virtual Machine defines a machine-independent format for binary files called the class (.class) file format. This format includes instructions for a virtual computer in the form of bytecodes. The bytecode representation of any Java Language program is symbolic in the sense that offsets and indexes into methods are not constants, but are, instead, given symbolically as string names. The first time a method is called, it is searched by name in the class file format, and its offset numeric value is determined at that time for quicker access at subsequent lookups. Therefore, any new or overriding method can be introduced late at runtime anywhere in the class structure, and it will be referred to symbolically, and properly accessed without breaking the code.
The bytecodes are a high-level representation of the program so that optimization and machine code generation (via a just-in-time compiler) can be performed at that level. In addition, garbage collection can occur inside the Virtual Machine, since it holds variables in stacks in the Java Platform address space.

Similar Messages

  • Real time JVM  Implementation

    Hi All,
    We some students of our university would like to implement Real time JVM on Linux.
    We do have a solid idea on linux as well as on Java. But this is a very new and interesting topic.
    Can anyone help me how to start the assignment i.e. implementation of real time jvm on linux.
    Thanks and Regards
    tapas

    Just guessing...
    There are only two impacts to real time processing in java.
    First the garbage collector. Since it runs at odd times. And ties up the rest of the application for unpredictable amounts of time a real time system will need another type of solution.
    Second, threads. Because threads prempt each other this can also produce unpredictable behavior. Some usual solutions involve no threads at all. Or a way to preclude interruption.
    Finally I suspect that if you do a literature search you would be able to find some papers on this subject.

  • Jvm implementation  for servlets

    Hi
    I want to know, how JVM is implemented in case of servlets in which no main method is present? What are the runtime data areas for that?

    main method is just entry point for standard launcher. You can start from any method with use of JNI.
    Application servers ussually have its own entry main, but then they run servlet by specific interface.

  • Multi-threading JVM implementation on multi-core Linux

    Does the Linux JVM run separate threads on separate cores in a multi-core machine? What rules does the scheduler use to make that decision?

    Yes but the scheduler is an OS functionality, not Java. You the Java programmer should not worry about that. Important things on Java programmer level are written in the book:
    http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601/ref=pd_bbs_2/104-0029622-4532777?ie=UTF8&s=books&qid=1185504553&sr=1-2

  • JVM crashes with: VM_Operation generation collection for allocation

    I have a program using JNI, and the gc crashes JVM occasionally. The crashing occurs randomly. I can reproduce it by starting the program several times. Following is the JVM dump message:
    =================================================================
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0xb78eff96, pid=11442, tid=2830195904
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode)
    # Problematic frame:
    # V [libjvm.so+0x120f96]
    --------------- T H R E A D ---------------
    Current thread (0x080b5780): VMThread [id=11447]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000e9bc8
    Registers:
    EAX=0xa8b1530c, EBX=0xb7b11e28, ECX=0xb7aff648, EDX=0x000e9bc8
    ESP=0xa8b1516c, EBP=0xa8b15184, ESI=0x08436eb4, EDI=0xa8b1530c
    EIP=0xb78eff96, CR2=0x000e9bc8, EFLAGS=0x00210203
    Top of Stack: (sp=0xa8b1516c)
    0xa8b1516c: a8b1530c 080b51a0 080b8330 b7b11e28
    0xa8b1517c: 08436eb0 0841d398 a8b151b4 b78f2061
    0xa8b1518c: a8b1530c 08436eb4 a90e9bc8 a90e9bc8
    0xa8b1519c: 080ba01c b7b08fa0 b7b08f40 000003d8
    0xa8b151ac: a8b1530c 0806b2b0 a8b151d4 b7a6decb
    0xa8b151bc: 0808c320 a8b1530c a8b1530c a8b1530c
    0xa8b151cc: b7b11e28 00000001 a8b15214 b790695c
    0xa8b151dc: a8b1530c 00000005 0806b3e8 0806b3e8
    Instructions: (pc=0xb78eff96)
    0xb78eff86: c3 a4 1e 22 00 8b 16 85 d2 74 35 3b 57 1c 73 30
    0xb78eff96: 8b 02 83 e0 03 83 f8 03 75 30 8b 02 83 e0 fc 89
    Stack: [0xa8a96000,0xa8b16000), sp=0xa8b1516c, free space=508k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [libjvm.so+0x120f96]
    V [libjvm.so+0x123061]
    V [libjvm.so+0x29eecb]
    V [libjvm.so+0x13795c]
    V [libjvm.so+0x11f7cd]
    V [libjvm.so+0x13741f]
    V [libjvm.so+0xf5ce1]
    V [libjvm.so+0x137682]
    V [libjvm.so+0x2ed2e4]
    V [libjvm.so+0x2ed046]
    V [libjvm.so+0x2ec6b7]
    V [libjvm.so+0x2ec8c5]
    V [libjvm.so+0x2ec4d0]
    V [libjvm.so+0x25f108]
    C [libpthread.so.0+0x42b6]
    VM_Operation (0xa7242004): generation collection for allocation, mode: safepoint, requested by thread 0x08499520
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0xa89146e8 JavaThread "DestroyJavaVM" [_thread_blocked, id=11442]
    0x084a0520 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=11462]
    0x0849eac8 JavaThread "AWT-Shutdown" [_thread_blocked, id=11461]
    0x08499520 JavaThread "Thread-2" daemon [_thread_blocked, id=11460]
    0x08471790 JavaThread "Thread-1" [_thread_in_native, id=11459]
    0x0842b890 JavaThread "AWT-XAWT" daemon [_thread_blocked, id=11455]
    0x084118b0 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=11454]
    0x080c5b10 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11452]
    0x080c45c0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=11451]
    0x080c3728 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=11450]
    0x080b8fd0 JavaThread "Finalizer" daemon [_thread_blocked, id=11449]
    0x080b8330 JavaThread "Reference Handler" daemon [_thread_blocked, id=11448]
    Other Threads:
    =>0x080b5780 VMThread [id=11447]
    0x080c6fa0 WatcherThread [id=11453]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x0805b5b0/0x0805b5d8] Threads_lock - owner thread: 0x080b5780
    [0x0805ba00/0x0805ba18] Heap_lock - owner thread: 0x08499520
    Heap
    def new generation total 576K, used 550K [0xa8ba0000, 0xa8c40000, 0xa9080000)
    eden space 512K, 100% used [0xa8ba0000, 0xa8c20000, 0xa8c20000)
    from space 64K, 60% used [0xa8c30000, 0xa8c39ad8, 0xa8c40000)
    to space 64K, 2% used [0xa8c20000, 0xa8c206c8, 0xa8c30000)
    tenured generation total 1408K, used 798K [0xa9080000, 0xa91e0000, 0xacba0000)
    the space 1408K, 56% used [0xa9080000, 0xa9147b50, 0xa9147c00, 0xa91e0000)
    compacting perm gen total 8192K, used 7693K [0xacba0000, 0xad3a0000, 0xb0ba0000)
    the space 8192K, 93% used [0xacba0000, 0xad323780, 0xad323800, 0xad3a0000)
    No shared spaces configured.
    Dynamic libraries:
    08048000-08056000 r-xp 00000000 03:43 5145000 /usr/java/jdk1.5.0_04/bin/java
    08056000-08058000 rwxp 0000e000 03:43 5145000 /usr/java/jdk1.5.0_04/bin/java
    08058000-08a04000 rwxp 08058000 00:00 0 [heap]
    42000000-4212e000 r-xp 00000000 03:43 655363 /lib/tls/libc-2.3.2.so
    4212e000-42131000 rwxp 0012e000 03:43 655363 /lib/tls/libc-2.3.2.so
    42131000-42133000 rwxp 42131000 00:00 0
    a6e13000-a6e2e000 r-xp 00000000 03:43 4112449 /usr/share/fonts/default/Type1/n021003l.pfb
    a6e2e000-a6e3e000 rwxs 00000000 00:07 213713006 /SYSV00002cb2 (deleted)
    a6e3e000-a6e52000 r-xp 00000000 03:43 4112443 /usr/share/fonts/default/Type1/n019044l.pfb
    a6e52000-a6e6d000 r-xp 00000000 03:43 4112449 /usr/share/fonts/default/Type1/n021003l.pfb
    a6e6d000-a6e80000 r-xp 00000000 03:43 4112441 /usr/share/fonts/default/Type1/n019043l.pfb
    a6e80000-a6ecc000 rwxp a6e80000 00:00 0
    a6ecc000-a70a1000 rwxs 00000000 00:07 213680229 /SYSV00000000 (deleted)
    a70a1000-a70a9000 r-xp 00000000 03:43 6979921 /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
    a70a9000-a70aa000 rwxp 00007000 03:43 6979921 /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2
    a70aa000-a70c3000 r-xp 00000000 03:43 6979920 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
    a70c3000-a70c5000 rwxp 00019000 03:43 6979920 /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
    a70c5000-a70c8000 ---p a70c5000 00:00 0
    a70c8000-a7145000 rwxp a70c8000 00:00 0
    a7145000-a7148000 ---p a7145000 00:00 0
    a7148000-a71c5000 rwxp a7148000 00:00 0
    a71c5000-a71c8000 ---p a71c5000 00:00 0
    a71c8000-a7245000 rwxp a71c8000 00:00 0
    a7245000-a7248000 ---p a7245000 00:00 0
    a7248000-a72c5000 rwxp a7248000 00:00 0
    a72c5000-a72d8000 r-xp 00000000 03:43 6883133 /usr/X11R6/lib/libXmu.so.6.2
    a72d8000-a72d9000 rwxp 00013000 03:43 6883133 /usr/X11R6/lib/libXmu.so.6.2
    a72d9000-a74c8000 r-xp 00000000 03:43 1445820 /opt/tools/multimedia/install_flash_player_7_linux/libflashplayer.so
    a74c8000-a74d8000 rwxp 001ef000 03:43 1445820 /opt/tools/multimedia/install_flash_player_7_linux/libflashplayer.so
    a74d8000-a759f000 rwxp a74d8000 00:00 0
    a759f000-a75b3000 r-xp 00000000 03:43 6883089 /usr/X11R6/lib/libICE.so.6.3
    a75b3000-a75b4000 rwxp 00013000 03:43 6883089 /usr/X11R6/lib/libICE.so.6.3
    a75b4000-a75b6000 rwxp a75b4000 00:00 0
    a75b6000-a75bd000 r-xp 00000000 03:43 6883092 /usr/X11R6/lib/libSM.so.6.0
    a75bd000-a75be000 rwxp 00007000 03:43 6883092 /usr/X11R6/lib/libSM.so.6.0
    a75be000-a75dc000 r-xp 00000000 03:43 360471 /usr/lib/libexpat.so.0.4.0
    a75dc000-a75de000 rwxp 0001e000 03:43 360471 /usr/lib/libexpat.so.0.4.0
    a75de000-a75e6000 r-xp 00000000 03:43 3212363 /usr/lib/libgcc_s.so.1
    a75e6000-a75e7000 rwxp 00007000 03:43 3212363 /usr/lib/libgcc_s.so.1
    a75e7000-a76ad000 r-xp 00000000 03:43 3212368 /usr/lib/libstdc++.so.6.0.3
    a76ad000-a76b2000 rwxp 000c6000 03:43 3212368 /usr/lib/libstdc++.so.6.0.3
    a76b2000-a76b7000 rwxp a76b2000 00:00 0
    a76b7000-a76fd000 r-xp 00000000 03:43 6883098 /usr/X11R6/lib/libXt.so.6.0
    a76fd000-a7700000 rwxp 00046000 03:43 6883098 /usr/X11R6/lib/libXt.so.6.0
    a7700000-a7701000 rwxp a7700000 00:00 0
    a7701000-a7725000 r-xp 00000000 03:43 3428509 /usr/local/garnome/lib/libpangoft2-1.0.so.0.800.1
    a7725000-a7726000 rwxp 00024000 03:43 3428509 /usr/local/garnome/lib/libpangoft2-1.0.so.0.800.1
    a7726000-a772a000 r-xp 00000000 03:43 6883231 /usr/X11R6/lib/libXfixes.so.3.0
    a772a000-a772b000 rwxp 00003000 03:43 6883231 /usr/X11R6/lib/libXfixes.so.3.0
    a772b000-a7751000 r-xp 00000000 03:43 6883201 /usr/X11R6/lib/libfontconfig.so.1.0.4
    a7751000-a7756000 rwxp 00026000 03:43 6883201 /usr/X11R6/lib/libfontconfig.so.1.0.4
    a7756000-a7757000 rwxp a7756000 00:00 0
    a7757000-a7763000 r-xp 00000000 03:43 360515 /usr/lib/libz.so.1.1.4
    a7763000-a7765000 rwxp 0000b000 03:43 360515 /usr/lib/libz.so.1.1.4
    a7765000-a77c1000 r-xp 00000000 03:43 365899 /usr/lib/libfreetype.so.6.3.7
    a77c1000-a77c8000 rwxp 0005c000 03:43 365899 /usr/lib/libfreetype.so.6.3.7
    a77c8000-a77d8000 r-xp 00000000 03:43 6883206 /usr/X11R6/lib/libXft.so.2.1.2
    a77d8000-a77d9000 rwxp 0000f000 03:43 6883206 /usr/X11R6/lib/libXft.so.2.1.2
    a77d9000-a77e0000 r-xp 00000000 03:43 6883155 /usr/X11R6/lib/libXi.so.6.0
    a77e0000-a77e1000 rwxp 00006000 03:43 6883155 /usr/X11R6/lib/libXi.so.6.0
    a77e1000-a781f000 r-xp 00000000 03:43 3524199 /home/steven/mozilla/objdir/nsprpub/pr/src/libnspr4.so
    a781f000-a7821000 rwxp 0003d000 03:43 3524199 /home/steven/mozilla/objdir/nsprpub/pr/src/libnspr4.so
    a7821000-a7822000 rwxp a7821000 00:00 0
    a7822000-a7826000 r-xp 00000000 03:43 50245 /opt/projects/wonder/svn/trunk/javaflash/lib/libgtkxtbin.so
    a7826000-a7827000 rwxp 00003000 03:43 50245 /opt/projects/wonder/svn/trunk/javaflash/lib/libgtkxtbin.so
    a7827000-a78fe000 r-xp 00000000 03:43 3784903 /usr/local/lib/libiconv.so.2.2.0
    a78fe000-a78ff000 rwxp 000d7000 03:43 3784903 /usr/local/lib/libiconv.so.2.2.0
    a78ff000-a797f000 r-xp 00000000 03:43 7275834 /usr/lib/libglib-2.0.so.0.600.3
    a797f000-a7980000 rwxp 0007f000 03:43 7275834 /usr/lib/libglib-2.0.so.0.600.3
    a7980000-a79b8000 r-xp 00000000 03:43 7275838 /usr/lib/libgobject-2.0.so.0.600.3
    a79b8000-a79b9000 rwxp 00037000 03:43 7275838 /usr/lib/libgobject-2.0.so.0.600.3
    a79be000-a79c8000 r-xp 00000000 03:43 6080345 /usr/local/garnome/lib/gtk-2.0/2.4.0/engines/libredmond95.so
    a79c8000-a79c9000 rwxp 00009000 03:43 6080345 /usr/local/garnome/lib/gtk-2.0/2.4.0/engines/libredmond95.so
    a79c9000-a79d0000 r-xp 00000000 03:43 6080349 /usr/local/garnome/lib/gtk-2.0/2.4.0/engines/libthinice.so
    a79d0000-a79d1000 rwxp 00006000 03:43 6080349 /usr/local/garnome/lib/gtk-2.0/2.4.0/engines/libthinice.so
    a79d1000-a79fe000 r-xp 00000000 03:43 3428497 /usr/local/garnome/lib/libpango-1.0.so.0.800.1
    a79fe000-a7a03000 rwxp 0002c000 03:43 3428497 /usr/local/garnome/lib/libpango-1.0.so.0.800.1
    a7a03000-a7a1b000 r-xp 00000000 03:43 3424601 /usr/local/garnome/lib/libatk-1.0.so.0.901.0
    a7a1b000-a7a1d000 rwxp 00017000 03:43 3424601 /usr/local/garnome/lib/libatk-1.0.so.0.901.0
    a7a1d000-a7a9a000 r-xp 00000000 03:43 3014738 /usr/local/garnome/lib/libgdk-x11-2.0.so.0.600.4
    a7a9a000-a7a9d000 rwxp 0007d000 03:43 3014738 /usr/local/garnome/lib/libgdk-x11-2.0.so.0.600.4
    a7a9d000-a7d74000 r-xp 00000000 03:43 3014741 /usr/local/garnome/lib/libgtk-x11-2.0.so.0.600.4
    a7d74000-a7d7c000 rwxp 002d7000 03:43 3014741 /usr/local/garnome/lib/libgtk-x11-2.0.so.0.600.4
    a7d7c000-a7d7f000 rwxp a7d7c000 00:00 0
    a7d7f000-a7d82000 ---p a7d7f000 00:00 0
    a7d82000-a7dff000 rwxp a7d82000 00:00 0
    a7dff000-a7e06000 r-xp 00000000 03:43 6883224 /usr/X11R6/lib/libXcursor.so.1.0.2
    a7e06000-a7e07000 rwxp 00007000 03:43 6883224 /usr/X11R6/lib/libXcursor.so.1.0.2
    a7e07000-a7e09000 r-xp 00000000 03:43 6883195 /usr/X11R6/lib/libXinerama.so.1.0
    a7e09000-a7e0a000 rwxp 00001000 03:43 6883195 /usr/X11R6/lib/libXinerama.so.1.0
    a7e0a000-a7e1e000 r-xp 00000000 03:43 3014734 /usr/local/garnome/lib/libgdk_pixbuf-2.0.so.0.600.4
    a7e1e000-a7e1f000 rwxp 00014000 03:43 3014734 /usr/local/garnome/lib/libgdk_pixbuf-2.0.so.0.600.4
    a7e1f000-a7e22000 ---p a7e1f000 00:00 0
    a7e22000-a7e9f000 rwxp a7e22000 00:00 0
    a7e9f000-a7f12000 r-xp 00000000 03:43 5145942 /usr/java/jdk1.5.0_04/jre/lib/i386/libfontmanager.so
    a7f12000-a7f1c000 rwxp 00073000 03:43 5145942 /usr/java/jdk1.5.0_04/jre/lib/i386/libfontmanager.so
    a7f1c000-a7f20000 rwxp a7f1c000 00:00 0
    a7f20000-a7f58000 r-xs 00000000 03:43 3196949 /opt/projects/wonder/svn/trunk/javaflash/lib/mysql-connector-java-3.0.9-stable-bin.jar
    a7f58000-a7f70000 r-xs 00000000 03:43 6358581 /opt/projects/wonder/svn/trunk/javaflash/lib/servlet-api.jar
    a7f70000-a7f8c000 r-xs 00000000 03:43 219155 /opt/projects/wonder/svn/trunk/javaflash/lib/openamf-1.0RC11-1.jar
    a7f8c000-a7fb6000 r-xs 00000000 03:43 50909 /opt/projects/wonder/svn/trunk/javaflash/lib/commons-lang-2.0.jar
    a7fb6000-a7fed000 r-xs 00000000 03:43 50910 /opt/projects/wonder/svn/trunk/javaflash/lib/commons-httpclient-2.0.jar
    a7fed000-a8017000 r-xs 00000000 03:43 50908 /opt/projects/wonder/svn/trunk/javaflash/lib/commons-digester.jar
    a8017000-a80a0000 r-xs 00000000 03:43 50258 /opt/projects/wonder/svn/trunk/javaflash/lib/commons-collections-3.1.jar
    a80a0000-a80cf000 r-xs 00000000 03:43 50257 /opt/projects/wonder/svn/trunk/javaflash/lib/commons-beanutils-1.7.0.jar
    a80cf000-a80e6000 r-xs 00000000 03:43 50256 /opt/projects/wonder/svn/trunk/javaflash/lib/astranslator-1.5.8.jar
    a80e6000-a81a2000 r-xp 00000000 03:43 6883076 /usr/X11R6/lib/libX11.so.6.2
    a81a2000-a81a6000 rwxp 000bb000 03:43 6883076 /usr/X11R6/lib/libX11.so.6.2
    a81a6000-a81b2000 r-xp 00000000 03:43 6883095 /usr/X11R6/lib/libXext.so.6.4
    a81b2000-a81b3000 rwxp 0000c000 03:43 6883095 /usr/X11R6/lib/libXext.so.6.4
    a81b3000-a81b5000 r-xp 00000000 03:43 6883215 /usr/X11R6/lib/libXrandr.so.2.0
    a81b5000-a81b6000 rwxp 00002000 03:43 6883215 /usr/X11R6/lib/libXrandr.so.2.0
    a81b6000-a81c0000 r-xp 00000000 03:43 3428505 /usr/local/garnome/lib/libpangox-1.0.so.0.800.1
    a81c0000-a81c1000 rwxp 00009000 03:43 3428505 /usr/local/garnome/lib/libpangox-1.0.so.0.800.1
    a81c1000-a81cb000 r-xs 00000000 03:43 50243 /opt/projects/wonder/svn/trunk/javaflash/lib/commons-logging-1.0.4.jar
    a81cb000-a8201000 r-xp 00000000 03:43 5145974 /usr/java/jdk1.5.0_04/jre/lib/i386/xawt/libmawt.so
    a8201000-a8204000 rwxp 00035000 03:43 5145974 /usr/java/jdk1.5.0_04/jre/lib/i386/xawt/libmawt.so
    a8204000-a8205000 rwxp a8204000 00:00 0
    a8205000-a82cb000 r-xp 00000000 03:43 5145960 /usr/java/jdk1.5.0_04/jre/lib/i386/libmlib_image.so
    a82cb000-a82cc000 rwxp 000c5000 03:43 5145960 /usr/java/jdk1.5.0_04/jre/lib/i386/libmlib_image.so
    a82cc000-a8341000 r-xp 00000000 03:43 5145937 /usr/java/jdk1.5.0_04/jre/lib/i386/libawt.so
    a8341000-a8347000 rwxp 00074000 03:43 5145937 /usr/java/jdk1.5.0_04/jre/lib/i386/libawt.so
    a8347000-a836b000 rwxp a8347000 00:00 0
    a836b000-a8396000 r-xs 00000000 03:43 5145898 /usr/java/jdk1.5.0_04/jre/lib/ext/sunpkcs11.jar
    a8396000-a83bc000 r-xs 00000000 03:43 5145897 /usr/java/jdk1.5.0_04/jre/lib/ext/sunjce_provider.jar
    a83bc000-a8480000 r-xs 00000000 03:43 5145893 /usr/java/jdk1.5.0_04/jre/lib/ext/localedata.jar
    a8480000-a8481000 ---p a8480000 00:00 0
    a8481000-a8500000 rwxp a8481000 00:00 0
    a8500000-a8503000 ---p a8500000 00:00 0
    a8503000-a8580000 rwxp a8503000 00:00 0
    a8580000-a8583000 ---p a8580000 00:00 0
    a8583000-a8600000 rwxp a8583000 00:00 0
    a8600000-a8603000 ---p a8600000 00:00 0
    a8603000-a8680000 rwxp a8603000 00:00 0
    a8680000-a8880000 r-xp 00000000 03:43 479417 /usr/lib/locale/locale-archive
    a8880000-a8883000 ---p a8880000 00:00 0
    a8883000-a892f000 rwxp a8883000 00:00 0
    a892f000-a8a00000 ---p a892f000 00:00 0
    a8a00000-a8a02000 r-xp 00000000 03:43 7275842 /usr/lib/libgmodule-2.0.so.0.600.3
    a8a02000-a8a03000 rwxp 00002000 03:43 7275842 /usr/lib/libgmodule-2.0.so.0.600.3
    a8a03000-a8a08000 r-xp 00000000 03:43 3428535 /usr/local/garnome/lib/libpangoxft-1.0.so.0.800.1
    a8a08000-a8a09000 rwxp 00005000 03:43 3428535 /usr/local/garnome/lib/libpangoxft-1.0.so.0.800.1
    a8a09000-a8a0d000 r-xp 00000000 03:43 5279633 /opt/projects/wonder/svn/trunk/javaflash/src/c/libjavaflash.so
    a8a0d000-a8a0e000 rwxp 00003000 03:43 5279633 /opt/projects/wonder/svn/trunk/javaflash/src/c/libjavaflash.so
    a8a0e000-a8a15000 r-xp 00000000 03:43 6883198 /usr/X11R6/lib/libXrender.so.1.2.2
    a8a15000-a8a16000 rwxp 00006000 03:43 6883198 /usr/X11R6/lib/libXrender.so.1.2.2
    a8a16000-a8a19000 ---p a8a16000 00:00 0
    a8a19000-a8a96000 rwxp a8a19000 00:00 0
    a8a96000-a8a97000 ---p a8a96000 00:00 0
    a8a97000-a8b1b000 rwxp a8a97000 00:00 0
    a8b1b000-a8b37000 rwxp a8b1b000 00:00 0
    a8b37000-a8b38000 rwxp a8b37000 00:00 0
    a8b38000-a8b55000 rwxp a8b38000 00:00 0
    a8b55000-a8b56000 rwxp a8b55000 00:00 0
    a8b56000-a8b57000 rwxp a8b56000 00:00 0
    a8b57000-a8b59000 rwxp a8b57000 00:00 0
    a8b59000-a8b75000 rwxp a8b59000 00:00 0
    a8b75000-a8b79000 rwxp a8b75000 00:00 0
    a8b79000-a8b9f000 rwxp a8b79000 00:00 0
    a8b9f000-a8c40000 rwxp a8b9f000 00:00 0
    a8c40000-a9080000 rwxp a8c40000 00:00 0
    a9080000-a91e0000 rwxp a9080000 00:00 0
    a91e0000-acba0000 rwxp a91e0000 00:00 0
    acba0000-ad3a0000 rwxp acba0000 00:00 0
    ad3a0000-b27a0000 rwxp ad3a0000 00:00 0
    b27a1000-b27a2000 r-xp 00000000 03:43 6979918 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
    b27a2000-b27a3000 rwxp 00000000 03:43 6979918 /usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
    b27a3000-b27a9000 r-xs 00000000 03:43 606386 /usr/lib/gconv/gconv-modules.cache
    b27a9000-b27ad000 rwxp b27a9000 00:00 0
    b27ad000-b2829000 rwxp b27ad000 00:00 0
    b2829000-b28f9000 rwxp b2829000 00:00 0
    b28f9000-b4829000 rwxp b28f9000 00:00 0
    b4829000-b5064000 r-xs 00000000 03:43 5146001 /usr/java/jdk1.5.0_04/jre/lib/charsets.jar
    b5064000-b5078000 r-xs 00000000 03:43 5146000 /usr/java/jdk1.5.0_04/jre/lib/jce.jar
    b5078000-b50ff000 r-xs 00000000 03:43 5146016 /usr/java/jdk1.5.0_04/jre/lib/jsse.jar
    b50ff000-b5168000 rwxp b50ff000 00:00 0
    b5168000-b7748000 r-xs 00000000 03:43 5146021 /usr/java/jdk1.5.0_04/jre/lib/rt.jar
    b7748000-b775b000 r-xp 00000000 03:43 5145968 /usr/java/jdk1.5.0_04/jre/lib/i386/libzip.so
    b775b000-b775d000 rwxp 00012000 03:43 5145968 /usr/java/jdk1.5.0_04/jre/lib/i386/libzip.so
    b775d000-b777e000 r-xp 00000000 03:43 5145948 /usr/java/jdk1.5.0_04/jre/lib/i386/libjava.so
    b777e000-b7780000 rwxp 00020000 03:43 5145948 /usr/java/jdk1.5.0_04/jre/lib/i386/libjava.so
    b7780000-b7792000 r-xp 00000000 03:43 2523154 /lib/libnsl-2.3.2.so
    b7792000-b7793000 rwxp 00011000 03:43 2523154 /lib/libnsl-2.3.2.so
    b7793000-b7795000 rwxp b7793000 00:00 0
    b7797000-b7798000 r-xp 00000000 03:43 5145953 /usr/java/jdk1.5.0_04/jre/lib/i386/libjawt.so
    b7798000-b7799000 rwxp 00000000 03:43 5145953 /usr/java/jdk1.5.0_04/jre/lib/i386/libjawt.so
    b7799000-b77a4000 r-xp 00000000 03:43 5145967 /usr/java/jdk1.5.0_04/jre/lib/i386/libverify.so
    b77a4000-b77a5000 rwxp 0000b000 03:43 5145967 /usr/java/jdk1.5.0_04/jre/lib/i386/libverify.so
    b77a5000-b77ad000 rwxs 00000000 03:43 1836606 /tmp/hsperfdata_steven/11442
    b77ad000-b77ce000 r-xp 00000000 03:43 1704993 /lib/tls/libm-2.3.2.so
    b77ce000-b77cf000 rwxp 00020000 03:43 1704993 /lib/tls/libm-2.3.2.so
    b77cf000-b7af7000 r-xp 00000000 03:43 5145932 /usr/java/jdk1.5.0_04/jre/lib/i386/client/libjvm.so
    b7af7000-b7b15000 rwxp 00327000 03:43 5145932 /usr/java/jdk1.5.0_04/jre/lib/i386/client/libjvm.so
    b7b15000-b7f2b000 rwxp b7b15000 00:00 0
    b7f2b000-b7f2d000 r-xp 00000000 03:43 2523152 /lib/libdl-2.3.2.so
    b7f2d000-b7f2e000 rwxp 00002000 03:43 2523152 /lib/libdl-2.3.2.so
    b7f2e000-b7f38000 r-xp 00000000 03:43 1704995 /lib/tls/libpthread-0.29.so
    b7f38000-b7f39000 rwxp 0000a000 03:43 1704995 /lib/tls/libpthread-0.29.so
    b7f39000-b7f3b000 rwxp b7f39000 00:00 0
    b7f3c000-b7f3e000 r-xs 00000000 03:43 2033060 /usr/java/jdk1.5.0_04/jre/lib/ext/dnsns.jar
    b7f3e000-b7f49000 r-xp 00000000 03:43 2523429 /lib/libnss_files-2.3.2.so
    b7f49000-b7f4a000 rwxp 0000a000 03:43 2523429 /lib/libnss_files-2.3.2.so
    b7f4a000-b7f50000 r-xp 00000000 03:43 5145970 /usr/java/jdk1.5.0_04/jre/lib/i386/native_threads/libhpi.so
    b7f50000-b7f51000 rwxp 00006000 03:43 5145970 /usr/java/jdk1.5.0_04/jre/lib/i386/native_threads/libhpi.so
    b7f51000-b7f52000 rwxp b7f51000 00:00 0
    b7f52000-b7f53000 ---p b7f52000 00:00 0
    b7f53000-b7f54000 rwxp b7f53000 00:00 0
    b7f54000-b7f69000 r-xp 00000000 03:43 2523138 /lib/ld-2.3.2.so
    b7f69000-b7f6a000 rwxp 00014000 03:43 2523138 /lib/ld-2.3.2.so
    bf769000-bf76c000 ---p bf769000 00:00 0
    bf76c000-bf969000 rwxp bf76c000 00:00 0 [stack]
    ffffe000-fffff000 ---p 00000000 00:00 0 [vdso]
    VM Arguments:
    java_command: sjtu.dctc.wonder.flashui.TestFlashUI
    Environment Variables:
    JAVA_HOME=/usr/java/jdk1.5.0_03
    PATH=/usr/local/garnome/bin:/usr/local/garnome/sbin:/usr/local/kde3.4/bin:/usr/local/kde3.4/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/sbin:/home/steven/bin:/usr/java/jdk1.5.0_03/bin:/opt/ant/bin
    USERNAME=steven
    LD_LIBRARY_PATH=/usr/java/jdk1.5.0_04/jre/lib/i386/client:/usr/java/jdk1.5.0_04/jre/lib/i386:/usr/java/jdk1.5.0_04/jre/../lib/i386:/opt/projects/wonder/svn/trunk/javaflash/src/c:/opt/projects/wonder/svn/trunk/javaflash/lib:/home/steven/mozilla/objdir/dist/lib:/usr/local/garnome/lib:/usr/local/kde3.4/lib:/usr/local/BerkeleyDB.4.3/lib
    SHELL=/bin/bash
    DISPLAY=:0.0
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x2e52f0], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    SIGBUS: [libjvm.so+0x2e52f0], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    SIGFPE: [libjvm.so+0x25d640], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    SIGPIPE: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x04000000
    SIGILL: [libjvm.so+0x25d640], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x25f980], sa_mask[0]=0x00000004, sa_flags=0x14000004
    SIGHUP: [libjvm.so+0x25f3b0], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    SIGINT: [libjvm.so+0x25f3b0], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    SIGQUIT: [libjvm.so+0x25f3b0], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    SIGTERM: [libjvm.so+0x25f3b0], sa_mask[0]=0xfffbfeff, sa_flags=0x14000004
    --------------- S Y S T E M ---------------
    OS:Red Hat Linux release 9 (Shrike)
    uname:Linux 2.6.12.2-smp #3 SMP Sat Jul 2 08:10:18 CST 2005 i686
    libc:glibc 2.3.2 NPTL 0.29
    rlimit: STACK 8192k, CORE 0k, NPROC 4089, NOFILE 1024, AS infinity
    load average:1.79 0.51 0.22
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 514764k(6852k free), swap 1052248k(907128k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_04-b05) for linux-x86, built on Jun 3 2005 03:17:33 by java_re with gcc 3.2.1-7a (J2SE release)
    ================================================================
    The following is the gc dump when the operation is successful:
    ================================================================
    [GC  {Heap before GC invocations=9:
    Heap
    def new generation   total 576K, used 559K [0x49970000, 0x49a10000, 0x4c0d0000)
      eden space 512K, 100% used [0x49970000, 0x499f0000, 0x499f0000)
      from space 64K,  74% used [0x49a00000, 0x49a0bdf0, 0x49a10000)
      to   space 64K,   0% used [0x499f0000, 0x499f0000, 0x49a00000)
    tenured generation   total 1408K, used 762K [0x4c0d0000, 0x4c230000, 0x69970000)
       the space 1408K,  54% used [0x4c0d0000, 0x4c18ea80, 0x4c18ec00, 0x4c230000)
    compacting perm gen  total 8192K, used 1553K [0x69970000, 0x6a170000, 0x6d970000)
       the space 8192K,  18% used [0x69970000, 0x69af46f0, 0x69af4800, 0x6a170000)
        ro space 8192K,  68% used [0x6d970000, 0x6deea338, 0x6deea400, 0x6e170000)
        rw space 12288K,  47% used [0x6e170000, 0x6e7297d8, 0x6e729800, 0x6ed70000)
    [DefNew: 559K->19K(576K), 0.0018160 secs] 1322K->817K(1984K) Heap after GC invocations=10:
    Heap
    def new generation total 576K, used 19K [0x49970000, 0x49a10000, 0x4c0d0000)
    eden space 512K, 0% used [0x49970000, 0x49970000, 0x499f0000)
    from space 64K, 30% used [0x499f0000, 0x499f4f28, 0x49a00000)
    to space 64K, 0% used [0x49a00000, 0x49a00000, 0x49a10000)
    tenured generation total 1408K, used 798K [0x4c0d0000, 0x4c230000, 0x69970000)
    the space 1408K, 56% used [0x4c0d0000, 0x4c197880, 0x4c197a00, 0x4c230000)
    compacting perm gen total 8192K, used 1553K [0x69970000, 0x6a170000, 0x6d970000)
    the space 8192K, 18% used [0x69970000, 0x69af46f0, 0x69af4800, 0x6a170000)
    ro space 8192K, 68% used [0x6d970000, 0x6deea338, 0x6deea400, 0x6e170000)
    rw space 12288K, 47% used [0x6e170000, 0x6e7297d8, 0x6e729800, 0x6ed70000)
    } , 0.0021780 secs]
    ========================================================================
    The following is the gc dump when JVM crashes:
    ========================================================================
    [GC  {Heap before GC invocations=9:
    Heap
    def new generation   total 576K, used 546K [0x49970000, 0x49a10000, 0x4c0d0000)
      eden space 512K, 100% used [0x49970000, 0x499f0000, 0x499f0000)
      from space 64K,  54% used [0x49a00000, 0x49a08a48, 0x49a10000)
      to   space 64K,   0% used [0x499f0000, 0x499f0000, 0x49a00000)
    tenured generation   total 1408K, used 792K [0x4c0d0000, 0x4c230000, 0x69970000)
       the space 1408K,  56% used [0x4c0d0000, 0x4c1960f0, 0x4c196200, 0x4c230000)
    compacting perm gen  total 8192K, used 1551K [0x69970000, 0x6a170000, 0x6d970000)
       the space 8192K,  18% used [0x69970000, 0x69af3c90, 0x69af3e00, 0x6a170000)
        ro space 8192K,  68% used [0x6d970000, 0x6deea338, 0x6deea400, 0x6e170000)
        rw space 12288K,  47% used [0x6e170000, 0x6e7297d8, 0x6e729800, 0x6ed70000)
    [DefNew#
    =======================================================================
    I can reproduce the error in jdk1.5.0_03, jdk1.5.0_04 and jdk1.6.0-ea-b50. I am sure it's my program's fault, not the gc's. But as I have no knowledge of sun's JVM implementation, I don't know what may be the root cause. What error in JNI may cause the problem above?
    Hope you can help me! Thanks ahead.
    Best Regards,
    Steven Gong                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    It is a core dump. Hence i feel the problem is in
    your native code. I think there is a null pointer
    exception or any exception in your native code. Check
    the native code. If it was java code problem, it
    would have generated an exception.You mean there may be unhandled exceptions in native code that
    may cause this problem?

  • JVM's scheduling policy

    Greetings,
    I would like to know what is the JVM's scheduling policy? what does it aims for (i.e., low waiting time, low response time, low turnaround time)?
    If any of you have an idea, please share it with me...
    Kind regards and thanks in advanced,
    Ohad Raz

    After investigating this a little more I found this
    article
    http://java.sun.com/docs/books/tutorial/essential/thre
    ds/priority.html
    Some points from the article
    The Java runtime supports a very simple, deterministic
    scheduling algorithm known as fixed priority
    scheduling.
    Scheduling of the CPU is fully preemptive. If a thread
    with a higher priority than the currently executing
    thread needs to execute, the higher priority thread is
    immediately scheduled.
    The Java runtime will not preempt the currently
    running thread for another thread of the same
    priority. In other words, the Java runtime does not
    time-slice. However, the system implementation of
    threads underlying the Java Thread class may support
    time-slicing. Do not write code that relies on
    time-slicing.
    When all the runnable threads in the system have the
    same priority, the scheduler chooses the next thread
    to run in a simple, non-preemptive, round-robin
    scheduling order
    So it seems as though there is scheduling done in the
    JVM but it the OS is also involved, which is shown
    with the time slicing.Well, Sethaw, I think your answer might be sufficient for me.
    I understand that the JVM implements the fixed priority scheduling, which aims at minimum turnaround time, under the limitation of priority.
    Thanks!

  • Multiple JVMs within app server - refresh of metdata not working

    Hi guys.
    We have an interesting scenario at present when running our application within a new test environment.
    Our web-based application has the facility to refresh it's application metadata. This should mean that the next time the browser refreshes (or a user logs in to the application), the application will display based upon the refreshed metadata structure.
    Previously, we have run our application on an app server with a single JVM without any dramas. ie. the refresh has always been reflected appropriately when viewing the application - as mentioned above.
    However, we have installed the application in a new environment where the refreshing of meta data does not work consistently. That is, only about 50% of the time does the data refresh correctly. This can be seen by pressing the refresh button in an IE browser, so that the refreshed data appears approx. every second time the button is pressed. The only notable difference with this environment is that it runs 2 JVMs within the app server.
    It seems that in this case, the 'old' data remains cached for the 'other' JVM, and that when the browser receives 'refreshed' data from the server, it does not always source from the same JVM.
    This situation can be resolved by restarting the OC4J container, but this is not a desireable solution.
    Is anyone aware of an OC4J parameter that can be set so that the 2 JVMs can run in synch so that both are refreshed appropriately when our meta data is cleared (refreshed) ? I don't believe this can be controlled within the Java source code, but I'm receptive to any other alternate solutions.
    Thanks in advance.
    Steve.

    I'd like to embed multiple instances of the JVM within
    a single, multi-threaded native server process. I'm
    aware this was not possible with the Sun JDK in the
    past.
    Is this still true (for JDK 1.4.1 say)?Yes, this is still true.
    If it's still not possible, are there any timetables
    as of when it might be available? No.
    Likelihood?Check the current list of JSRs at http://www.jcp.org.
    Ah, btw: Is support for VM unloading (during
    DestroyJavaVM()) available now?No.
    >
    In any case: does anybody know of a JVM
    implementation
    available for Linux which supports multiple VM
    instances within a single process?Why do you need multiple VMs? Would multiple separate 'processes' within a single VM work? If so, have a look at:
    http://www.cs.utah.edu/flux/janos/janosvm.html
    http://www.javagroup.org/echidna/
    Jim S.

  • Mouse Scroll speed problems with JVM

    I could not find Java (Apple’s JVM ) forums, so I might be posting this in the wrong forum. With that disclaimer, here is my issue:
    I am running into a problem where the mouse-wheel scrolling speed configurations are not being properly passed to Java applications. I have set my scrolling speed to the maximum, all works well with regula apps, yet when I use my mouse-wheel to scroll and window in a Java application, scrolling it is unbearably slow, the wheel becomes useless.
    Also, horizontal scrolling does not work in any java application either.
    I believe these are a problem with Apple's JVM implementation. Are there any workarounds?
    Has anyone else experience this?
    JVM v1.5

    Does this happen with all Java apps or just a handful? I ask because I found that OpenOffice scrolls so slowly that it's unusable. However, I think this is an issue with OO, not with Java. Other Java apps scroll fine for me.

  • Implementing a Text Component

    Hi all, I have to implement a custom text component for a
    project im working on. I was hoping someone could give me
    some direction on how to implement the text storage.
    I wont need more than the regular 256 ascii characters and
    text sizes could reach 4+ megs.
    1 - an array list of bytes
    2 - a stringbuffer
    3 - a LONG string
    I was thinking about doing every line as an arraylist of bytes
    and then putting the line objects into an arraylist - as opposed
    to a contiguous list of bytes.
    that way moving through the data will be easier.
    As well, im most interested in knowing how they implement the
    actual component. I was going to draw the characters (im using
    custom fonts) onto a bufferedimage and then display them onto
    a custom component that will be a JPanel with a drawn on scrollbar
    that will control the drawing bounds.
    i was hoping someone with a knowledge of how Java implements
    text components could give a brief comment on how
    text is stored in memory and drawn on to the screen in a
    text component - id be forever grateful!
    i hear a lot of people say they read the Java source code but i
    wouldnt even know where to begin in such a process, lol.
    thanks!

    Secondly, I don't really understand what you are doing or
    why you feel you need to create a custom component to display textIm working on a mathematics project.
    There is an equation editor that has to be integrated with
    graphics routines (graphs, models etc).
    This JPanel will have keypresses mapped to symbols and
    special functions with the "text" formatted around the embedded
    graphics.
    The implementation will be easy - BUT it did get me curious
    on how the JVM implements a text component.
    From the internal representation (maybe stringbuffers?) to
    how it converts each Unicode char and then paints it into
    the component.
    After all looking up each char and then decoding the TrueType
    format (which i read uses a Virtual Machine with instruction sets)
    and drawing it (directly to the component or to an image?) seems
    like it would be intensive - but text components always seem
    very fast.

  • JVM virtual memory footprint

    I'm running java processes (specifically Tomcat) on a linux system with not too much available memory and I run into a lots of problems as java seems to consume a lot more memory than it would need.
    To understand the problem I created this "unit test":
    [root@vps download]# ulimit -v unlimited
    [root@vps download]# java -version
    java version "1.5.0_14"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode)
    [root@vps download]# ulimit -v 230000
    [root@vps download]# java -version
    java version "1.5.0_14"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode)
    [root@vps download]# ulimit -v 220000
    [root@vps download]# java -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.As you can see the java vm won't start up when the allowed virtual memory is under 230 Mb, which is an amount of memory I can't give java in a virtual server. I have tried limiting the memory consumption with any memory option I could find (starting with the famous -Xmx and -Xms ones) but always with the same results and problems.
    By running Tomcat and using "top" I noticed java requests over 250 Mb virtual memory, while actually using only around 35 Mb. I would be glad to allow this process to reserve up to 100Mb in virtual memory, but over that seems crazy, since I perfectly know my tomcat instance will never require that much memory and since I cannot "afford" all that memory usage from a single process. With that kind of consumption I can't even stop tomcat using the ordinary script (the shutdown.sh script will start another vm to send the stop signal to tomcat but since the first one is already consuming 250 Mb virtual memory and the second one tries to allocate as much I will get the heap error message as my server can't allocate that much total memory on top of the other processes).
    What solutions are there to stop java from reserving memory it won't use?

    ingoio256 wrote:
    First I quote yourself from another (someway similar) thread:
    "Under Linux, the OS allows over-allocation of memory (which means it can reserve memory that it doesn't have the physical RAM or swap file to back it up with)"
    If I was able to do that my problems would be solved: in fact my system doesn't have enough physical+swap memory, but since a lot less will be used by java processes if I was able to instruct the system to allocate it even if it's not available I would have my problems solved.
    Any idea about where I can find help on doing that?It may already be doing that; under Linux, I believe it only looks for memory to back up the allocation when the page is touched. Whether the java process touches all the memory it allocates, I don't know. Maybe it behaves differently when there's no page file.
    The second question is the following:
    I noticed java processes on the windows system don't use as much virtual memory as it happens in my vps: the reported virtual memory allocation is just slightly above the used physical one. Does that depend on a different implementation or does it happen after some time the jvm is running, with unused virtual memory being given back to the system? If the latter was right it would partly ease the problem as I would just need for the java process to be running for a while and then I would have some system resources released. If it's not the case... how can I have linux behave similarly to windows? As in this case it seems more efficient ;)Regarding the memory usage difference, I don't know why that is.
    I've seen people say that the Sun JVM doesn't return memory to the OS after it allocates, but I'm not sure of this. This is another aspect that a different JVM implementation could help with. I think IBM and BEA both have their own implementations you could check out.

  • Error: JVM option is invalid: -server

    We have downloaded the 'Oracle Application Server MapViewer 10.1.2 Kit and Quickstart' that was released on 10-January-2005.
    The start.sh script included in this kit to start OC4J is:
    #!/bin/sh
    #cd oc4j/j2ee/home;java -server -Xmx384M -Djava.awt.headless=true -jar oc4j.jar
    This errors with:
    The JVM option is invalid: -server
    Could not create the Java virtual machine.
    Note: The java version installed on the server is 1.4.2 and OS is IBM AIX 5.2L.
    The OC4J does start with the command:
    java -server -jar oc4j.jar
    Any thoughts on the option '-server' and is this required for running of mapviewer with the standalone version of OC4J?

    -server option is used to start jvm in server mode.
    in your case what's offending is probably the option -Xmx384M ( i think that option has different format on different jvm implementations).
    in any case, -server is not required to run mapviewer.

  • How does the JVM recover from a java.lang.StackOverflowError?

    As far as I know that whenever a java.lang.OutOfMemoryError is thrown, the application is in an unknown state and only a restart of the JVM can fix this. How about java.lang.StackOverflowError? If uncaught, the calling thread is terminated for sure, but the other threads? Are there side-effects?

    In windows OS that thread will die and thats all.
    I think that in some unix systems the whole process
    is likely to fail.Not exactly. It's not nearly as dependent on the operating system as it is on the quality of the JVM implementation. StackOverflowErrors are tricky to handle correctly in all cases, but most JVMs (including Sun's) now properly handle the vast majority of them. FWIW, most unix-based or unix-like operating systems make it somewhat easier to deal with StackOverflowError than Windows, particularly Windows versions prior to Win2K.
    A thread that triggers a StackOverflowError can actually catch it and recover; the important thing to note is that if you want to keep executing code on that thread, you have to allow many or most of the activations (i.e., function calls) on the stack to be unwound. Otherwise, you'll quickly provoke another StackOverflowError since you will still be close to the end of the stack.

  • Can we use JVM and/or Oracle Multimedia with the Express Edition?

    Hi!
    I wonder if there is any way to instal/use/activate JVM (implement java classes) and/or Oracle Multimedia?
    I want to make a little application that would exploit those features ...
    Can we do this with Oracle Express?
    If so, how do I proceed?
    Thanks everyone.

    SadWell...
    i was surprised that I have'nt been ask for a licence code or something...That's part of Oracle's distribution concept - you need to think about proper licensing yourself, until you get an audit. As you already mentioned, there could be user licensing - hard to manage with entering codes. On the other hand, there are OTN licensed downloads for development and evaluation purposes that don't need a paid license. Oracle doesn't want to build different packages for that, so you get exactly the same software for development your paying customer has for production.
    So...
    So, knowing this, is it legal if I install it and exploit it for my own purposes?I recommend reading the OTN license you've accepted before downloading the files.
    As I indicated above, it will (usually) allow you develop any application using any database release (including SE or even EE), without additional licensing. You need to make sure you never actually do any productive or testing-like activity on instances that are used under that license. Note that OTN license does not include support, so you are not allowed to install any patch you may have obtained from MOS using one of your companies support ids on such an instance.
    is there any 'personnal' licence (less expensive that the $350 per user (minimum 5 users)) i can buy for myself to legally use it?If you think what you do is not covered by the OTN license, there is "Oracle Database Personal Edition". See [url http://docs.oracle.com/cd/E11882_01/license.112/e10594/editions.htm#CJADFHGH]Database Licensing Information for details on the differences between the available database editions. According to the current price list, it's at $460 + $101.20 per year for support at the moment. The cheapest way to get a personal instance with access to patches & co.
    BTW: There is also Standard Edition One at $180 per user, but probably still a little too expensive for personal use, because the 5-users-rule applies.
    -Udo

  • IBM JVM - what is happening with it?

    I have not heard much talked about the IBM JVM (I think it was up to version 1.3 on windows and linux, perhaps higher on IBM platforms).
    The few things I have heard about it said it was good. In fact I am interested in any non-sun JVMs (that are up to J2SE1.4 if possible) for comparison. I have tried JRockit for server side apps, and in some cases the performance increase was substantial. In any case, having another JVM to play with would be useful (competition is a good thing).
    Any ideas what happened to all the JVM implementations (not interested in anything pre 1.3 J2SE, or anything that is half done).

    I have not heard much talked about the IBM JVM (I
    think it was up to version 1.3 on windows and linux,
    perhaps higher on IBM platforms).
    The few things I have heard about it said it was good.
    In fact I am interested in any non-sun JVMs (that are
    up to J2SE1.4 if possible) for comparison. I have
    tried JRockit for server side apps, and in some cases
    the performance increase was substantial. In any case,
    having another JVM to play with would be useful
    (competition is a good thing).
    Any ideas what happened to all the JVM implementations
    (not interested in anything pre 1.3 J2SE, or anything
    that is half done).Hi Michael,
    IBM/JRE 1.3.1 is still used in IBM products like Notes/Domino 6
    and the Websphere products.
    Marc

  • PROOF !  Classes can be unloaded from the JVM.. do you agree????

    this post shows you can unload a class from the JVM... do you agree?
    http://forum.java.sun.com/thread.jsp?forum=4&thread=327315&tstart=0&trange=15

    If you say "effectively", I would agree. Once the old classloader, the old class, and all old class instances are no longer reachable, then for all intents and purposes (except memory consumption) it is unloaded.
    Of course, it's up to the JVM implemention to decide whether (if at all) and when to gc that stuff.

Maybe you are looking for