pmadvise

- applies advice about memory to a process

Synopsis

pmadvise-ooption[,option] [-F] [-l] [-v] pid...

Description

pmadvise applies advice about how memory is used in the specified process
using madvise(3C).

pmadvise allows users to apply advice to a specific sub-range at a
specific instant in time. pmadvise differs from madv.so.1(1) in that madv.so.1(1) applies
the advice throughout execution of the target program to all segments of
a specified type.

Options

The following options are supported:

-F

Force by grabbing the target process even if another process has control.

An address and length can be given to specify a subrange to apply the advice. The address should be hexadecimal and the length should be in bytes by default.

If length is not specified and the starting address refers to the start of a segment, the advice is applied to that segment. length can be qualified by K, M, G, T, P, or E to specify kilobytes, megabytes, gigabytes, terabytes, or exabytes respectively as the unit of measure.

-v

Print verbose output. Display output as pmap(1) does, showing what advice is being applied where. This can be useful when the advice is being applied to a named region (for example, private, shared, and so forth) to get feedback on exactly where the advice is being applied.

pmadvise tries to process all legal options. If an illegal address range
is specified, an error message is printed and the offending option is
skipped. pmadvise quits without processing any options and prints a usage message
when there is a syntax error.

If conflicting advice is given on a region, the order of precedence
is from most specific advice to least, that is, most general. In
other words, advice specified for a particuliar address range takes precedence over
advice for heap and stack which in turn takes precedence over advice
for private and shared memory.

Moreover, the advice in each of the following groups are mutually exclusive
from the other advice within the same group: