Skip to content

maropu/jnuma

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

jnuma

A Java library for accessing NUMA (Non Uniform Memory Access) API.

How to use

You can simply use ByteBuffer-like APIs to handle NUMA properties as follows:

// Allocate memory on a NUMA node 1, and the memory is
// automatically collected by GC.
NumaByteBuffer buf = new NumaByteBuffer(16, 1)

// Access data by using ByteBuffer-like APIs
buf.putDouble(1.3, 39L)
buf.putLong(8, 6L)

System.out.println(bb.getDouble(0)) // Print 1.3
System.out.println(bb.getLong(8))   // Print 6

As you imagine, you can directly access primitive NUMA APIs through the NUMA class.

Limitation

Currenty jnuma supports 64-bit Linux only. For the other operating systems, standard memory allocation in JVM will be used.

Packaging

If you create a JAR package, you type bin/sbt assembly.

Requirements

  • libnuma (2.0 or higher)
  • gcc (glibc 2.5 or higher)
  • jdk (1.6 or higher)

About

A Java library for accessing NUMA (Non Uniform Memory Access) API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 46.4%
  • Java 31.1%
  • Shell 12.1%
  • C 5.1%
  • Scala 4.7%
  • Makefile 0.6%