11.01.2013 Views

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

[00800] 00000400<br />

[01000] 00000400<br />

[02000] 00000400<br />

[04000] 00000400<br />

[08000] 00000400<br />

Ratio of memory to declare a memory leak: 0x400(1024)/0x400(1024)<br />

Outstanding memory allocations to declare a memory leak: -1<br />

Deferred page reclamation count (-1 == when necessary): 16384<br />

Minimum allocation size to force a record for: 1048576<br />

Note: The bosdebug -M command sets all the frequencies for alloc.xmdbg at maximal level<br />

except for “promotion settings” which are all set to zero (0). A reboot is required in order for<br />

bosdebug to take effect.<br />

3.9.4 XMDBG tunables affected by error check level<br />

As previously mentioned, xmalloc RTEC features are activated for a given allocation based<br />

on probabilities. The errctrl command that controls the tunables takes the probability of<br />

application (frequency) as an argument.<br />

In <strong>AIX</strong> V6.1, the user can set the probability of a check being performed by specifying the<br />

frequency of a tunable as a number between 0 and 1024. This is the number of times out of<br />

the base frequency (1024) that the technique is to be applied by xmalloc. For example, to<br />

request 50%, the user specifies a frequency of 512.<br />

Frequencies can be input as decimal or hex numbers, so 50% can be specified as 0x200. As<br />

a convenient alternative, the frequency can be expressed as a percentage. To do this, the<br />

user specifies a number between 0 and 100 followed by the percent (%) sign. The following<br />

sections detail the RTEC tunables for the xmalloc.xmdbg component.<br />

Keep an allocation record<br />

This option sets the frequency of keeping a record for an allocation. Records are also kept if<br />

any other debug technique is applied, so the percentage of allocations with a record may be<br />

considerably larger than this number would otherwise indicate.<br />

The allocation record contains a three-level stack trace-back of the xmalloc() and xmfree()<br />

callers, as well as other debug information about the allocated memory. The presence of a<br />

record is a minimum requirement for xmalloc run time error checking.<br />

errctrl -c alloc.xmdbg alloc_record=<br />

Ruin storage<br />

This option sets the frequency at which xmalloc() will return storage that is filled with a “ruin”<br />

pattern. This helps catch errors with un-initialized storage, because a caller with bugs is more<br />

likely to crash when using the ruined storage. Note that xmalloc() does not perform any<br />

explicit checks when this technique is employed. The ruined data will contain 0x66 in every<br />

allocated byte on allocation, and 0x77 in every previously allocated byte after being freed.<br />

errctrl -c alloc.xmdbg ruin_all=<br />

Check for overwrites in small allocations<br />

This is one of the three options that affect the frequency of trailers. There are two options that<br />

deal with trailers, and a third option deals with compatibility with previous versions of <strong>AIX</strong>.<br />

This option is specific for allocations that are less than half a page. A trailer is written<br />

Chapter 3. <strong>AIX</strong> advanced continuous availability tools and features 131

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!