title: Use of function pmemobj_persist
body: <p>I am new to PMEM and I am using libpmemobj for my development. I have a question on the simple example below.</p>
  <pre class="lang-c prettyprint-override"><code>int main() {
    PMEMobjpool* pop1 = pmemobj_create(&quot;/tmp/mypool_int_1&quot;, LAYOUT_NAME_1, PMEMOBJ_MIN_POOL, 0666)
  
    PMEMoid root_int = pmemobj_root(pop1, sizeof(int));
  
    int* root_int_p = pmemobj_direct(root_int);
  
    *root_int_p = 65535;
  
    pmemobj_persist(pop1, &amp;root_int_p, sizeof(int));
  
    pmemobj_close(pop1);
  
    return 0;
  }
  </code></pre>
  <p>What will happen if we do not call the <code>pmemobj_persist</code>?
  Would the data already written with <code>*root_int_p = 65535;</code> be already persisted?
  Since we are writing directly into the PM address with Persistent Memory Direct Access, should I always invoke this?</p>
  <p>The man pages says &quot;pmemobj_persist() forces any changes in the range [addr, addr+len) to be stored durably in persistent memory&quot;</p>
  <p>What do you meant by durable stored in persistent memory?</p>