Using lgrp_fini()

The lgrp_fini() function invalidates the given cookie frees the corresponding lgroup hierarchy snapshot.

#include <sys/lgrp_user.h>
int lgrp_fini(lgrp_cookie_t cookie);

The lgrp_fini() function takes a cookie that represents an lgroup hierarchy snapshot created by a previous call to lgrp_init(). The lgrp_fini() function frees the memory that is allocated to that snapshot. After the call to lgrp_fini(), the cookie is invalid and cannot be used again.

When the cookie passed to the lgrp_fini() function is invalid, lgrp_fini() returns EINVAL. For more information about lgrp_fini() function, see the lgrp_fini(3LGRP) man page.