cpusetGetMemLimits(3x)cpusetGetMemLimits(3x)NAMEcpusetGetMemLimits - get the memory size limits for a cpuset
SYNOPSIS
#include <cpuset.h>
int cpusetGetMemLimits(char *qname, uint64_t *advisory,
uint64_t *mandatory);
DESCRIPTION
The cpusetGetMemLimits function is used to obtain the advisory and
mandatory memory sizes that constrained the conditions under which the
cpuset could be created. The advisory memory size limit will be copied
into the memory referenced by the advisory argument. The mandatory
memory size limit will be copied into the memory referenced by the
mandatory argument.
Only processes running with a user ID or group ID that has read access
permissions on the permissions file can successfully execute this
function. The qname argument is the name of the specified cpuset.
The return value of the function indicates if the function was
successfully executed.
EXAMPLES
This example prints out the advisory and mandatory memory sizes used when
creating the cpuset mpi_set.
char *qname = "mpi_set";
int memadv = 0;
int memman = 0;
/* Get the limits else print error & exit */
if (!cpusetGetMemLimits(qname, &memadv, &memman)) ) {
perror("cpusetGetMemLimits");
exit(1);
}
printf("Memory size, advisory limit: %llu\n", memadv);
printf("Memory size, mandatory limit: %llu\n", memman);
NOTEScpusetGetMemLimits is found in the library "libcpuset.so", and will be
loaded if the option -lcpuset is used with cc(1) or ld(1).
SEE ALSOcpuset(1), cpusetSetMemLimits(3x), cpuset(5).
DIAGNOSTICS
If successful, cpusetGetMemLimits returns 1. If cpusetGetMemLimits
fails, it returns 0 and errno is set to indicate the error. The possible
values for errno include those values as set by sysmp(2) and sbrk(2).
Page 1