Programing

Java 옵션 -Xmx의 의미는 무엇입니까?

lottogame 2020. 4. 7. 08:14
반응형

Java 옵션 -Xmx의 의미는 무엇입니까? [복제]


이 질문에는 이미 답변이 있습니다.

java -Xmx1024m filename

무슨 -Xmx뜻입니까?


여기 참조 : 자바 도구 문서는 , 그것이 말하는,

-Xmx n
메모리 할당 풀의 최대 크기 (바이트)를 지정하십시오. 이 값은 2MB보다 1024의 배수 여야합니다. 킬로바이트를 표시하려면 문자 k 또는 K를 추가하고 메가 바이트를 표시하려면 m 또는 M을 추가하십시오. 기본값은 64MB입니다. 이 값의 상한은 Solaris 7 및 Solaris 8 SPARC 플랫폼에서 약 4000m이고 Solaris 2.6 및 x86 플랫폼에서 2,000m입니다. 예 :

           -Xmx83886080
           -Xmx81920k
           -Xmx80m

간단히 말해 Java 힙 메모리를 사용 가능한 메모리에서 최대 1024MB로 설정하는 것입니다.

-Xmx와 1024m 사이 에는 공간없습니다.

대문자 또는 소문자를 사용하더라도 중요하지 않습니다. 예를 들어 "-Xmx10G"와 "-Xmx10g"는 똑같은 작업을 수행합니다.


C:\java -X

    -Xmixed           mixed mode execution (default)
    -Xint             interpreted mode execution only
    -Xbootclasspath:<directories and zip/jar files separated by ;>
                      set search path for bootstrap classes and resources
    -Xbootclasspath/a:<directories and zip/jar files separated by ;>
                      append to end of bootstrap class path
    -Xbootclasspath/p:<directories and zip/jar files separated by ;>
                      prepend in front of bootstrap class path
    -Xnoclassgc       disable class garbage collection
    -Xincgc           enable incremental garbage collection
    -Xloggc:<file>    log GC status to a file with time stamps
    -Xbatch           disable background compilation
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size
    -Xss<size>        set java thread stack size
    -Xprof            output cpu profiling data
    -Xfuture          enable strictest checks, anticipating future default
    -Xrs              reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni       perform additional checks for JNI functions
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.

The -X options are non-standard and subject to change without notice.

-Xmx 옵션은 VM의 최대 힙 공간을 변경합니다. java -Xmx1024m은 VM이 최대 1024MB를 할당 할 수 있음을 의미합니다. 평신도의 관점에서 볼 때 응용 프로그램은 최대 1024MB의 메모리를 사용할 수 있습니다.


응용 프로그램의 최대 힙 사용량은 1024MB입니다.


-Xmx 최대 힙 크기를 설정합니다

참고 URL : https://stackoverflow.com/questions/5374455/what-does-java-option-xmx-stand-for

반응형