Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Qustion about reachability fence and code paths #275

Open
Labels
questionQueries on usage of the library, architectural patterns and alike
@stroomdev66

Description

@stroomdev66

I assume that it doesn't matter that not all code paths hit the reachability fence. Is the presence of them at the end of the method all that is needed to stop premature GC?

e.g.

    final Pointer transientKey = txn.kv().keyIn(key);    final Pointer transientVal = txn.kv().valIn(val);    final int mask = mask(true, flags);    final int rc =            LIB.mdb_put(txn.pointer(), ptr, txn.kv().pointerKey(), txn.kv().pointerVal(), mask);    if (rc == MDB_KEYEXIST) {      if (isSet(mask, MDB_NOOVERWRITE)) {        txn.kv().valOut(); // marked as in,out in LMDB C docs      } else if (!isSet(mask, MDB_NODUPDATA)) {        checkRc(rc);      }      return false;    }    checkRc(rc);    ReferenceUtil.reachabilityFence0(transientKey);    ReferenceUtil.reachabilityFence0(transientVal);    ReferenceUtil.reachabilityFence0(key);    ReferenceUtil.reachabilityFence0(val);

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQueries on usage of the library, architectural patterns and alike

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp