Platform SDK: DLLs, Processes, and Threads

JOBOBJECT_EXTENDED_LIMIT_INFORMATION

The JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure contains basic and extended limit information for a job object.

typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION {
    JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
    IO_COUNTERS IoInfo;
    SIZE_T ProcessMemoryLimit;
    SIZE_T JobMemoryLimit;
    SIZE_T PeakProcessMemoryUsed;
    SIZE_T PeakJobMemoryUsed;
} JOBOBJECT_EXTENDED_LIMIT_INFORMATION, *PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;

Members

BasicLimitInformation
A JOBOBJECT_BASIC_LIMIT_INFORMATION structure that contains basic limit information.
IoInfo
Reserved.
ProcessMemoryLimit
Ignored unless the LimitFlags member of the JOBOBJECT_BASIC_LIMIT_INFORMATION structure specifies the JOB_OBJECT_LIMIT_PROCESS_MEMORY value. Specifies the per-process memory limit.
JobMemoryLimit
Ignored unless the LimitFlags member of the JOBOBJECT_BASIC_LIMIT_INFORMATION structure specifies the JOB_OBJECT_LIMIT_JOB_MEMORY value. Specifies the per-job memory limit.
PeakProcessMemoryUsed
Specifies the most process memory used by any process ever associated with the job.
PeakJobMemoryUsed
Specifies the peak memory usage of all processes associated with the job.

Remarks

The system tracks the value of PeakProcessMemoryUsed and PeakJobMemoryUsed constantly. This allows you know the peak memory usage of each job. You can use this information to establish a memory limit using the JOB_OBJECT_LIMIT_PROCESS_MEMORY or JOB_OBJECT_LIMIT_JOB_MEMORY value.

Note that the job memory and process memory limits are very similar in operation, but they are independent. You could set a job-wide limit of 100 MB with a per-process limit of 10 MB. In this scenario, no single process could commit more than 10 MB, and the set of processes associated with a job could never exceed 100 MB.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winnt.h; include Windows.h.

See Also

Processes and Threads Overview, Process and Thread Structures, JOBOBJECT_BASIC_LIMIT_INFORMATION, QueryInformationJobObject, SetInformationJobObject