Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
67c19a60
Commit
67c19a60
authored
7 years ago
by
stepan
Browse files
Options
Downloads
Patches
Plain Diff
NativeMirror IDs are invalid addresses
parent
167f7d23
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/NativeDataAccess.java
+4
-2
4 additions, 2 deletions
...c/com/oracle/truffle/r/runtime/data/NativeDataAccess.java
with
4 additions
and
2 deletions
com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/NativeDataAccess.java
+
4
−
2
View file @
67c19a60
...
...
@@ -126,7 +126,7 @@ public final class NativeDataAccess {
private
Object
nativeWrapper
;
NativeMirror
()
{
this
.
id
=
counter
.
increment
AndGet
();
this
.
id
=
counter
.
add
AndGet
(
2
);
}
/**
...
...
@@ -187,7 +187,9 @@ public final class NativeDataAccess {
}
}
private
static
final
AtomicLong
counter
=
new
AtomicLong
(
0xdef000000000000
L
);
// The counter is initialized to invalid address and incremented by 2 to always get invalid
// address value
private
static
final
AtomicLong
counter
=
new
AtomicLong
(
0xdef000000000001
L
);
private
static
final
ConcurrentHashMap
<
Long
,
WeakReference
<
RObject
>>
nativeMirrors
=
new
ConcurrentHashMap
<>();
private
static
final
ConcurrentHashMap
<
Long
,
RuntimeException
>
nativeMirrorInfo
=
new
ConcurrentHashMap
<>();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment