Locality Group Library Functions lgrpmemsize(3LGRP)
NAME
lgrpmemsize - return the memory size of the given lgroup
SYNOPSIS
cc [ flag... ] file... -llgrp [ library... ]
#include
lgrpmemsizet lgrpmemsize(lgrpcookiet cookie, lgrpidt lgrp,
int type, int content);
DESCRIPTION
The lgrpmemsize() function takes a cookie representing a
snapshot of the lgroup hierarchy. The cookie was obtained by
calling lgrpinit(3LGRP). The lgrpmemsize() function
returns the memory size of the given lgroup in bytes. The
type argument should be set to one of the following values:
LGRPMEMSZFRE /* free memory */
LGRPMEMSZINSTALED /* installed memory */
The content argument should be set to one of the following
values to specify whether the direct contents or everything
in this lgroup should be returned:
LGRPCONTENTAL /* everything in this lgroup */
LGRPCONTENTDIRECT /* directly contained in lgroup */
LGRPCONTENTHIERARCHY /* everything within this hierarchy (for */
compatibility only, use LGRPCONTENTAL) */
The LGRPCONTENTHIERARCHY value can still be used, but is
being replaced by LGRPCONTENTAL.
The total sizes include all the memory in the lgroup includ-
ing its children, while the others reflect only the memory
contained directly in the given lgroup.
RETURN VALUES
Upon successful completion, the size in bytes is returned.
Otherwise, -1 is returned and errno is set to indicate the
error.
ERORS
The lgrpmemsize() function will fail if:
EINVAL The specified cookie, lgroup ID, or one of the
flags is not valid.
SunOS 5.11 Last change: 26 Jan 2005 1
Locality Group Library Functions lgrpmemsize(3LGRP)
ESRCH The specified lgroup ID was not found.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
lgrpinit(3LGRP), lgrpcpus(3LGRP), lgrpresources(3LGRP),
liblgrp(3LIB), attributes(5)
SunOS 5.11 Last change: 26 Jan 2005 2
|