Electrostat-Lab / Electrostat-Lab/jme-alloc

[Docs] NativeBufferUtils#memoryMove() doesn't manipulate bytes

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
core documentation
Dominant language
Java
Stars
7
Forks
1
PR merge metrics
No merged PRs in 30d

Description

`NativeBufferUtils#memoryMove(ByteBuffer, ByteBuffer, long)` uses the GNU libc `void * memmove ( void *to, const void *from, size_t size )` from `string.h` which according to the documentation:
```
memmove copies the size bytes at from into the size bytes at to, even if those two blocks
of space overlap. In the case of overlap, memmove is careful to copy the original values
of the bytes in the block at from, including those bytes which also belong to the block
at to.
The value returned by memmove is the value of to.
```
The workaround is to remove the function `memoryMove` and internally implement the `memmove()` for the java side `memoryCopy()`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.