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.

immediately after the returned storage. Trailers can consume up to 128 bytes of storage.<br />

When storage is freed, xmfree() will ensure consistency in the trailer bytes and log an error.<br />

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

Note: The tunable small_trailer did not exist on 5.3, because all trailers were controlled<br />

with the single tunable known as alloc_trailer.<br />

The error disposition can be made more severe by changing the disposition of medium<br />

severity errors as follows:<br />

errctrl -c alloc.xmdbg medsevdisposition=sysdump<br />

Be aware, however, that overwrites to the trailers and other medium severity errors will cause<br />

a system crash if the severity disposition is changed to be more severe.<br />

Check for overwrites in large allocations<br />

This option sets the frequency of trailers that are added to allocations that require at least a<br />

full page. This technique catches the same type of errors as a redzone, but a redzone always<br />

starts at the next page boundary, and a trailer follows immediately after the bytes that are<br />

beyond the requested size.<br />

Trailers are checked at fragment free time for consistency. The error disposition can be<br />

affected for these checks just as it is for the small_trailer option. Trailers and redzones can be<br />

used together to ensure that overruns are detected. Trailers are not used if the requested size<br />

is exactly a multiple of the page size. Overwrites can still be detected by using the redzone<br />

option.<br />

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

Check for overwrites in all allocations<br />

This option is provided just for compatibility with <strong>AIX</strong> 5.3. It sets the frequency that xmalloc()<br />

will add a trailer to all allocations. To accomplish this, it overwrites the settings of both the<br />

small_trailer and large_trailer options.<br />

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

Promote fragment allocations to whole pages<br />

When an allocation that is less than half a 4 K page is promoted, the returned pointer is as<br />

close to the end of the page as possible while satisfying alignment restrictions and an extra<br />

“redzone” page is constructed after the allocated region. No other fragments are allocated<br />

from this page.<br />

This provides isolation for the returned memory and catches users that overrun buffers. When<br />

used in conjunction with the df_promote option, this also helps catch references to freed<br />

memory. This option uses substantially more memory than other options.<br />

Sizes that are greater than 2 K are still promoted in the sense that an extra redzone page is<br />

constructed for them.<br />

Note: The page size of the heap passed to xmalloc() makes no difference. If the heap<br />

normally contains 64 K pages (kernel_heap or pinned_heap on a machine that supports a<br />

64 K kernel heap page size), then the returned memory of a promoted allocation will still be<br />

backed by 4 K pages.<br />

These promoted allocations come from a region that has a 4 K page size, to avoid using an<br />

entire 64 K page as a redzone.<br />

132 <strong>IBM</strong> <strong>AIX</strong> <strong>Continuous</strong> <strong>Availability</strong> <strong>Features</strong>

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

Saved successfully!

Ooh no, something went wrong!