Moait
홈인기 피드모든 블로그모든 태그
홈인기 피드모든 블로그모든 태그
How can I detect that the system is running low on memory? Or that my job is running low on memory? 섬네일

How can I detect that the system is running low on memory? Or that my job is running low on memory?

Microsoft Developer faviconMicrosoft Developer·Architecture·
Memory ManagementWindows APIJob ObjectsMemory Resource Notification
2025년 12월 29일0

AI 요약

이 글은 AI가 요약했어요. 정확한 내용은 꼭 원문을 확인해 주세요!

핵심 요약

Microsoft Developer가 시스템 메모리 한계 탐지와 작업 메모리 한계 탐지의 차이 및 구현 방법을 정리했습니다.

구현 방법

  • 시스템 한계: CreateMemoryResourceNotification으로 시스템 전체 메모리 상태를 알리되, 해당 잡의 메모리 한계 반영은 제한적일 수 있습니다.
  • 작업 한계: JOB_OBJECT_SET_ATTRIBUTES로 한계를 설정하고, 한계 도달 시 JOB_OBJECT_MSG_NOTIFICATION_LIMIT가 완료 포트로 전달됩니다.
  • 자식 프로세스는 부모 잡 핸들을 필요로 하며, 중첩 잡의 경우 포트 공유 및 핸들 상속의 제약이 있습니다.

주요 결과

  • 메모리 한계 알림 방식 간 차이와 구현상의 주의점을 정리했습니다.
  • 중첩 잡과 포트 관리의 복잡성으로 추가 커스텀 로직 필요성이 제기됩니다

연관 피드

%가 높을수록 이 글과 비슷할 가능성이 높아요!
Is <code>Write­Process­Memory</code> faster than shared memory for transferring data between two processes? 섬네일
67%

Is <code>Write­Process­Memory</code> faster than shared memory for transferring data between two processes?

Microsoft Developer faviconMicrosoft Developer·2025년 11월 19일
Why are we worried about memory access semantics? Full barriers should be enough for anybody 섬네일
67%

Why are we worried about memory access semantics? Full barriers should be enough for anybody

Microsoft Developer faviconMicrosoft Developer·2025년 12월 26일
How can I detect that Windows is running in S-Mode, redux 섬네일
59%

How can I detect that Windows is running in S-Mode, redux

Microsoft Developer faviconMicrosoft Developer·2025년 11월 17일