1lgrp_mem_size(3LGRP)   Locality Group Library Functions   lgrp_mem_size(3LGRP)
2
3
4

NAME

6       lgrp_mem_size - return the memory size of the given lgroup
7

SYNOPSIS

9       cc [ flag... ] file... -llgrp [ library... ]
10       #include <sys/lgrp_user.h>
11
12       lgrp_mem_size_t lgrp_mem_size(lgrp_cookie_t cookie, lgrp_id_t lgrp,
13            int type, int content);
14
15

DESCRIPTION

17       The  lgrp_mem_size() function takes a cookie representing a snapshot of
18       the  lgroup   hierarchy.   The   cookie   was   obtained   by   calling
19       lgrp_init(3LGRP).  The lgrp_mem_size() function returns the memory size
20       of the given lgroup in bytes. The type argument should be set to one of
21       the following values:
22
23         LGRP_MEM_SZ_FREE                /* free memory */
24         LGRP_MEM_SZ_INSTALLED           /* installed memory */
25
26
27
28       The  content  argument  should be set to one of the following values to
29       specify whether the direct contents or everything in this lgroup should
30       be returned:
31
32         LGRP_CONTENT_ALL        /* everything in this lgroup */
33         LGRP_CONTENT_DIRECT     /* directly contained in lgroup */
34         LGRP_CONTENT_HIERARCHY  /* everything within this hierarchy (for */
35                                    compatibility only, use LGRP_CONTENT_ALL) */
36
37
38
39       The  LGRP_CONTENT_HIERARCHY  value  can  still  be  used,  but is being
40       replaced by LGRP_CONTENT_ALL.
41
42
43       The total sizes include all the memory  in  the  lgroup  including  its
44       children,  while  the others reflect only the memory contained directly
45       in the given lgroup.
46

RETURN VALUES

48       Upon successful completion, the size in bytes is  returned.  Otherwise,
49       −1 is returned and errno is set to indicate the error.
50

ERRORS

52       The lgrp_mem_size() function will fail if:
53
54       EINVAL    The  specified  cookie, lgroup ID, or one of the flags is not
55                 valid.
56
57
58       ESRCH     The specified lgroup ID was not found.
59
60

ATTRIBUTES

62       See attributes(5) for descriptions of the following attributes:
63
64
65
66
67       ┌─────────────────────────────┬─────────────────────────────┐
68       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
69       ├─────────────────────────────┼─────────────────────────────┤
70       │Interface Stability          │Evolving                     │
71       ├─────────────────────────────┼─────────────────────────────┤
72       │MT-Level                     │MT-Safe                      │
73       └─────────────────────────────┴─────────────────────────────┘
74

SEE ALSO

76       lgrp_init(3LGRP),       lgrp_cpus(3LGRP),        lgrp_resources(3LGRP),
77       liblgrp(3LIB), attributes(5)
78
79
80
81SunOS 5.11                        26 Jan 2005             lgrp_mem_size(3LGRP)
Impressum