/// <summary> /// Gets the resource limits for the current process /// </summary> /// <param name="resource">The type of resource limit to query for</param> /// <returns>Returns the rlimit values for the specific resource</returns> internal static rlimit getrlimit(RLIMIT_Resources resource) { rlimit info = new rlimit(); int result = getrlimit(resource, ref info); if (result < 0) { throw new System.ComponentModel.Win32Exception(SR.ResourceLimitQueryFailure); } return info; }
/// <summary> /// Gets the resource limits for the current process /// </summary> /// <param name="resource">The type of resource limit to query for</param> /// <returns>Returns the rlimit values for the specific resource</returns> internal static rlimit getrlimit(RLIMIT_Resources resource) { rlimit info = new rlimit(); int result = getrlimit(resource, ref info); if (result < 0) { throw new System.ComponentModel.Win32Exception(SR.ResourceLimitQueryFailure); } return(info); }
internal static extern int setrlimit( RLIMIT_Resources resource, ref rlimit info);
private static extern int getrlimit( RLIMIT_Resources resource, ref rlimit info);