OxCaml의 무할당 함수 검사로 메모리 안전성을 강화할 수 있다.
Jane Street의 OCaml 상위 집합인 OxCaml은 함수 호출 트리의 힙 할당을 금지하는 기능을 추가했습니다. 이 기능은 `[@zero_alloc]`을 사용하여 컴파일러에 선언할 수 있으며, 할당이 발생할 경우 즉시 컴파일러가 오류를 발생시킵니다. 이는 프로파일러를 이용해 나중에 발견하는 것보다 더 빠르게 회귀 오류를 잡을 수 있는 방법입니다.
OxCaml enhances memory safety with a zero-allocation function check.
OxCaml, a superset of OCaml by Jane Street, introduces a feature to prohibit heap allocations throughout the function call tree using `[@zero_alloc]`. This allows compilation to fail immediately if an allocation occurs in the declared call paths. Such an approach is faster than later finding regressions with a profiler.