File: syscon.c

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (52 lines) | stat: -rw-r--r-- 1,319 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <stdio.h>
#include <unistd.h>

main()
{
  int stat;
  long a;

  a=sysconf(_SC_ARG_MAX);
  printf("max combined size of argv[]= %d\n", a);

  a=sysconf(_SC_CLK_TCK);
  printf("clock tick per second= %d\n", a);

  a=sysconf(_SC_CHILD_MAX);
  printf("max processes allowed to any UID= %d\n", a);

  a=sysconf(_SC_OPEN_MAX);
  printf("max open files per process= %d\n", a);

  a=sysconf(_SC_PAGESIZE);
  printf("system memory page size= %d\n", a);

  a=sysconf(_SC_NPROCESSORS_CONF);
  printf("number of processors configured= %d\n", a);

  a=sysconf(_SC_NPROCESSORS_ONLN);
  printf("number of processors online= %d\n", a);

  a=sysconf(_SC_PHYS_PAGES);
  printf("total number of pages of physical memory= %d\n", a);

  a=sysconf(_SC_AVPHYS_PAGES);
  printf("number of pages of physical memory not in use= %d\n", a);

  a=sysconf(_SC_SEM_NSEMS_MAX);
  printf("maximum number of semaphores that a process may have= %d\n", a);

  a=sysconf(_SC_SEM_VALUE_MAX);
  printf("maximum value that a semaphore may have= %d\n", a);

  a=sysconf(_SC_SIGQUEUE_MAX);
  printf("maximum number of queued signals pending at receiver= %d\n", a);

  a=sysconf(_SC_TIMER_MAX);
  printf("maximum number of timers per process= %d\n", a);

  a=sysconf(_SC_SHARED_MEMORY_OBJECTS);
  printf("supports shared memory objects= %d\n", a);
}