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

Test lwjgl MemoryAccess #20

Open
Neiko2002 opened this issue Sep 21, 2016 · 2 comments
Open

Test lwjgl MemoryAccess #20

Neiko2002 opened this issue Sep 21, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@Neiko2002
Copy link
Member

Neiko2002 commented Sep 21, 2016

lwjgl has some native memory access. If it is providing similar performance it could be a good replacement for unsafe.
https://javadoc.lwjgl.org/org/lwjgl/system/jemalloc/JEmalloc.html
https://github.com/LWJGL/lwjgl3/blob/master/modules/core/src/main/java/org/lwjgl/system/MemoryAccess.java

Usage:
https://github.com/LWJGL/lwjgl3/blob/master/modules/core/src/test/java/org/lwjgl/demo/util/lmdb/LMDBDemo.java

Other
http://www.java-gaming.org/index.php?topic=36524.0
http://hardcodejavadog.blogspot.de/2015/02/comparing-java-off-heap-memory.html

LWJGL will make a module out of its jemalloc lib
LWJGL/lwjgl3#100
https://www.lwjgl.org/download -> nightly

Repo
https://oss.sonatype.org/content/repositories/snapshots/org/lwjgl/lwjgl-jemalloc/

project.ext.lwjglVersion = "3.0.1-SNAPSHOT"
project.ext.lwjglNatives = "natives-windows"

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
    compile "org.lwjgl:lwjgl-jemalloc:${lwjglVersion}"
    runtime "org.lwjgl:lwjgl-jemalloc:${lwjglVersion}:${lwjglNatives}"
}
@Neiko2002 Neiko2002 added this to the Release 1.2 milestone Sep 21, 2016
@Neiko2002 Neiko2002 self-assigned this Sep 21, 2016
@Neiko2002
Copy link
Member Author

There is also ByteBuf from netty.

@Neiko2002
Copy link
Member Author

And one-nio's FixedSizeAllocator, which can be used per class definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant