Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing MemoryAccessor for abstraction on memory access operations #7515

Conversation

serkan-ozal
Copy link
Contributor

  • MemoryAccessor is a new contact point for accessing memory.
  • The current MemoryAccessor implementations are Unsafe based and interprets given addresses as native memory addresses. So these implementations can be thought as direct memory accessors.
  • Note that address in this contract is not needed to be a native memory address. It might be interpreted differently by the implementation itself.
  • Also UnsafeHelper is deprecated and offered MemoryAccessor instead.

The follow-up task of this PR should be cleaning Unsafe usages in our code base.

* @param field
* @return
*/
long getObjectFieldOffset(Field field);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be should javaDoc here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I have forgotten them

@serkan-ozal serkan-ozal force-pushed the enhancement/master/introducing-memory-accessor branch from bab4fef to b21c67f Compare February 12, 2016 12:54
}

@Override
public long getLong(long address) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where I can point which ENDIAN here ?

@serkan-ozal serkan-ozal force-pushed the enhancement/master/introducing-memory-accessor branch 3 times, most recently from 3597e9f to 464a1c3 Compare February 12, 2016 17:41
*/
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can note the reason of deprecation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@ahmetmircik
Copy link
Member

only minors comments.

👍

@serkan-ozal serkan-ozal force-pushed the enhancement/master/introducing-memory-accessor branch from 464a1c3 to c2a390b Compare February 15, 2016 14:49
serkan-ozal pushed a commit that referenced this pull request Feb 15, 2016
…ing-memory-accessor

Introducing `MemoryAccessor` for abstraction on memory access operations
@serkan-ozal serkan-ozal merged commit a11c59e into hazelcast:master Feb 15, 2016
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee Team: Core Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants