The following table lists the functions associated with extended accounting memory management. The function name is a link to its man page.
Table 3–4 Extended Accounting Memory Management Functions
Link to man page |
Description |
---|---|
Converts an exacct object from unpacked (in-memory) representation to packed (in-file) representation. |
|
Converts an exacct object from packed (in-file) representation to unpacked (in-memory) representation. |
|
Duplicates a string that is to be stored inside an ea_object_t structure. |
|
Frees a string previously copied by ea_strdup(). |
|
Allocates a block of memory of the requested size. This block can be safely passed to libexacct functions, and can be safely freed by any of the ea_free functions. |
|
Frees a block of memory previously allocated by ea_alloc(). |
|
Frees variable-length data in object hierarchy. |
|
Frees value fields of designated object, if EUP_ALLOC is specified. The object is not freed. ea_free_object() frees the specified object and any attached hierarchy of objects. If the flag argument is set to EUP_ALLOC, ea_free_object() also frees any variable-length data in the object hierarchy. If the flag argument is set to EUP_NOALLOC, ea_free_object() does not free the variable-length data. In particular, these flags should correspond to the flags specified in calls to ea_unpack_object(3EXACCT). |
|
Copies an ea_object_t. If the source object is part of a chain, only the current object is copied. If the source object is a group, only the group object is copied without its list of members. The group object eg_nobjs and eg_objs fields are set to 0 and NULL respectively. Use ea_copy_tree() to copy recursively a group or a list of items. |
|
ea_copy_object_tree recursively copies an ea_object_t. All elements in the eo_next list are copied. Any group objects are recursively copied. The returned object can be completely freed with ea_free_object(3EXACCT) by specifying the EUP_ALLOC flag. |
|
Reads in nobj top-level objects from the file, returning the same data structure that would have originally been passed to ea_write_object(). On encountering a group object,ea_get_object() reads only the group header part of the group. ea_get_object_tree() reads the group and all its member items, recursing into subrecords if necessary. The returned object data structure can be completely freed with ea_free_object() by specifying the EUP_ALLOC flag. |