示例#1
0
        /// <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;
        }
示例#2
0
        /// <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);
        }
示例#3
0
 internal static extern int setrlimit(
     RLIMIT_Resources resource,
     ref rlimit info);
示例#4
0
 private static extern int getrlimit(
     RLIMIT_Resources resource,
     ref rlimit info);
示例#5
0
 internal static extern int setrlimit(
     RLIMIT_Resources    resource,
     ref rlimit          info);
示例#6
0
 private static extern int getrlimit(
     RLIMIT_Resources    resource, 
     ref rlimit          info);