<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reference on CRaC</title><link>https://crac.github.io/reference/</link><description>Recent content in Reference on CRaC</description><generator>Hugo</generator><language>en-GB</language><atom:link href="https://crac.github.io/reference/index.xml" rel="self" type="application/rss+xml"/><item><title>Best practices</title><link>https://crac.github.io/reference/best-practices/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.github.io/reference/best-practices/</guid><description>&lt;h2 id="best-practices-for-implementing-crac-support-in-your-applicationlibrary"&gt;Best practices for implementing CRaC support in your application/library&lt;/h2&gt;&#10;&lt;p&gt;This guide assumes you are already familiar with the concepts and &lt;code&gt;Resource&lt;/code&gt; API; please check out the &lt;a href="https://github.com/CRaC/docs/blob/master/STEP-BY-STEP.md" target="_blank" rel="noopener"&gt;step-by-step guide&lt;/a&gt;&#10; for those.&lt;/p&gt;&#10;&lt;h3 id="implementing-resource-as-inner-class"&gt;Implementing Resource as inner class&lt;/h3&gt;&#10;&lt;p&gt;In order to encapsulate the functionality, the &lt;code&gt;Resource&lt;/code&gt; interface is sometimes not implemented directly by the component but we rather create an (anonymous) inner class. However it is not sufficient to pass this resource to the &lt;code&gt;Context.register()&lt;/code&gt; method; Global Context tracks resources using &lt;em&gt;weak&lt;/em&gt; references. As there is no &lt;code&gt;unregister&lt;/code&gt; method on the Context, had a strong reference been used this would prevent the component from being garbage-collected when the application releases it. Therefore the class implementing &lt;code&gt;Resource&lt;/code&gt; should be stored inside the component (in a field) to prevent garbage-collection:&lt;/p&gt;</description></item><item><title>Checkpoint engines</title><link>https://crac.github.io/reference/engines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.github.io/reference/engines/</guid><description>&lt;p&gt;CRaC&amp;rsquo;s API is deliberately mechanism-agnostic: it tells your application that a&#10;checkpoint is happening without saying how. The mechanism that actually takes&#10;the image is a separate choice, made with &lt;code&gt;-XX:CRaCEngine=&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Debugging failures</title><link>https://crac.github.io/reference/debugging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.github.io/reference/debugging/</guid><description>&lt;h2 id="debugging-checkpoint-and-restore-failures"&gt;Debugging checkpoint and restore failures&lt;/h2&gt;&#10;&lt;p&gt;This guide will help you identify common problems when the checkpoint operation does not work.&lt;/p&gt;&#10;&lt;h3 id="failures-in-native-cr"&gt;Failures in native C/R&lt;/h3&gt;&#10;&lt;p&gt;When the checkpoint operation fails in the native part, there is usually little information in the stack trace of the exception:&lt;/p&gt;</description></item><item><title>CPU features</title><link>https://crac.github.io/reference/cpu-features/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.github.io/reference/cpu-features/</guid><description>&lt;p&gt;CPU features differ from host to host as newer CPUs offer support for newer&#10;instructions, and some optional features may be removed over time. JVM (Java&#10;Virtual Machine) depends on CPU features (such as AVX512, SSE3 etc.) of each&#10;computer it is running on. The more CPU features JVM can use the better&#10;performance it can provide. JVM normally uses all the CPU features it can find&#10;on the CPU where it has started.&lt;/p&gt;</description></item><item><title>File descriptor policies</title><link>https://crac.github.io/reference/fd-policies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://crac.github.io/reference/fd-policies/</guid><description>&lt;p&gt;CRaC requires that the application closes all open files, network connections etc. - on Linux these are represented as file descriptors. However, it might be difficult to alter the application to properly coordinate with the checkpoint, e.g. due to a code in a library you cannot modify. In those cases CRaC offers a limited handling via configuration. Note that this applies only to file descriptors opened through JDK API; anything opened through native code cannot be handled this way.&lt;/p&gt;</description></item></channel></rss>