JobObjectLimits Class
Defines a job object limits.
public sealed class JobObjectLimitsRemarks
A limit applies only when its property is set to a non-null value. Leave a property null - the default - to leave that limit alone.
Example
using var job = new JobObject();
var limits = new JobObjectLimits
{
Flags = JobObjectLimitFlags.KillOnJobClose,
ActiveProcessLimit = 10,
ProcessMemoryLimit = 100 * 1024 * 1024, // 100 MB
};
job.SetLimits(limits);Constructors
| Name | Description |
|---|---|
| JobObjectLimits() |
JobObjectLimits()
public JobObjectLimits()No documentation is available.
Properties
| Name | Description |
|---|---|
| ActiveProcessLimit | Gets or sets the active process limit for the job. |
| Affinity | Gets or sets the processor affinity for all processes associated with the job. |
| Flags | Defines options for a job object. |
| JobMemoryLimit | Gets or sets limit for the virtual memory that can be committed for the job. |
| MaximumWorkingSetSize | Gets or sets the maximum working set size for each process associated with the job. |
| MinimumWorkingSetSize | Gets or sets the minimum working set size for each process associated with the job. |
| PerJobUserTimeLimit | Gets or sets the per-job user-mode execution time limit, in 100-nanosecond ticks. |
| PerProcessUserTimeLimit | Gets or sets the per-process user-mode execution time limit, in 100-nanosecond ticks. |
| PriorityClass | Gets or sets priority class for all processes associated with the job. |
| ProcessMemoryLimit | Gets or sets the limit for the virtual memory that can be committed by a process. |
| SchedulingClass | Gets or sets scheduling class for all processes associated with the job. |
ActiveProcessLimit
JobObjectLimits.csAffinity
JobObjectLimits.csFlags
JobObjectLimits.csDefines options for a job object.
public JobObjectLimitFlags Flags { get; set; }Property value
JobObjectLimitFlags The options for a job object.
JobMemoryLimit
JobObjectLimits.csMaximumWorkingSetSize
JobObjectLimits.csGets or sets the maximum working set size for each process associated with the job.
public nuint? MaximumWorkingSetSize { get; set; }Property value
nuint? The maximum working set size for each process associated with the job, or null to apply no limit.
Remarks
Windows applies the working set limit only when both JobObjectLimits.MinimumWorkingSetSize and JobObjectLimits.MaximumWorkingSetSize are set.
MinimumWorkingSetSize
JobObjectLimits.csGets or sets the minimum working set size for each process associated with the job.
public nuint? MinimumWorkingSetSize { get; set; }Property value
nuint? The minimum working set size for each process associated with the job, or null to apply no limit.
Remarks
Windows applies the working set limit only when both JobObjectLimits.MinimumWorkingSetSize and JobObjectLimits.MaximumWorkingSetSize are set.