Main Content

메모리 사용량

생성된 C/C++ 코드에 사용되는 RAM, ROM, 스택 공간 줄이기

생성 코드가 메모리를 더 적게 사용하도록 MATLAB® 코드를 수정하는 방법을 결정합니다. 함수를 호출할 때 입력값과 출력값에 동일한 변수를 사용하여 데이터가 전달되는 방법을 제어합니다. 참조로 전달하면 생성 코드에 사용되는 메모리가 줄어듭니다. 스택 공간 사용에 대한 제한을 설정하고 동적 메모리 할당이 사용되는 시점을 지정하여 메모리가 할당되는 방법을 제어합니다. 추가 코드(예: 정수 오버플로 지원)를 생성하는 기능을 비활성화하여 코드 크기를 최소화합니다.

특정 조건에 맞게 코드를 최적화하는 방법에 대한 자세한 내용은 Optimization Strategies 항목을 참조하십시오.

함수

coder.areUnboundedVariableSizedArraysSupportedCheck if current configuration settings allow unbounded variable-size arrays (R2024a 이후)
coder.cevalCall C/C++ function from generated code
coder.constFold expressions into constants in generated code
coder.inlineControl inlining of current function in generated code
coder.inlineCallInline called function in generated code (R2024a 이후)
coder.nonInlineCallPrevent inlining of called function in generated code (R2024a 이후)

클래스

coder.ConstantSpecification of constant value for code generation
coder.ExternalDependencyInterface to external code

도움말 항목

생성 코드 최적화

조건문

함수 호출

배열

수치적 경계 조건

사용자 지정 코드 통합