Java 옵션 -Xmx는 무엇을 나타냅니까?
java -Xmx1024m filename
무엇인가.-Xmx심술궂은가요?
여기 참조: Java Tool Doc 라고 되어 있습니다.
- Xmxn
메모리 할당 풀의 최대 크기(바이트)를 지정합니다.이 값은 2MB보다 큰 1024의 배수여야 합니다. 킬로바이트를 나타내려면 문자 k 또는 K를, 메가바이트를 나타내려면 문자 m 또는 M을 추가하십시오.기본값은 64MB 입니다.이 값의 상한은 Solaris 7 및 Solaris 8 SPARC 플랫폼에서는 약 4000m, Solaris 2.6 및 x86 플랫폼에서는 2000m로 오버헤드를 뺀 값입니다.예:-Xmx83886080 -Xmx81920k -Xmx80m
즉, 간단히 말해 Java 힙메모리를 사용 가능한 메모리에서 최대 1024 MB로 설정합니다.
-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입니다.
-XmxMaximum Heap ]사이즈를 설정합니다.
언급URL : https://stackoverflow.com/questions/5374455/what-does-java-option-xmx-stand-for
'programing' 카테고리의 다른 글
| 업데이트 후 MariaDB를 시작할 수 없음: [경고] 테스트 파일 /home/mysql/beta.lower-test를 생성할 수 없습니다. (0) | 2022.12.20 |
|---|---|
| Java에서 ArrayList를 정렬하는 방법 (0) | 2022.12.20 |
| 플레인 JavaScript로 div 높이 가져오기 (0) | 2022.12.20 |
| Runtime Error: 응용 프로그램 컨텍스트 외부에서 작업 (0) | 2022.12.20 |
| 숫자 범위를 다른 범위로 매핑 (0) | 2022.12.20 |