Socket
Socket
Sign inDemoInstall

sh.den:scala-offheap_2.11

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sh.den:scala-offheap_2.11

scala-offheap


Version published
Maintainers
1
Source

Type-safe off-heap memory for Scala

Build Status Join the chat at https://gitter.im/densh/scala-offheap

Garbage collection is the standard memory management paradigm on the JVM. In theory, it lets one completely forget about the hurdles of memory management and delegate all of it to the underlying runtime. In practice, GC often leads to scalability issues on large heaps and latency-sensitive workloads.

The goal of this project is to expose a completely different memory management paradigm to the developers: explicitly annotated region-based memory. This paradigm gives more control over memory management without the need to micro-manage allocations.

@data class Dummy(id: Int) {
  def hello: Unit = println(s"Hello, i'm $id")
}

Region { implicit r =>
  for (i <- 1 to 100)
     Dummy(i).hello
}

For example the snippet above allocates 100 objects in a memory region. As long as the region is open, objects are retained in memory and available for access. Once it ends, all of them are efficiently deallocated at once.

Features

  • Efficient scoped region-based memory allocator
  • Optional low-overhead memory sanitizer for debugging and development
  • Offheap classes as a nice typed API for custom data layout
  • Offheap arrays with direct sequential layout in memory
  • Extensibility to accomodate custom memory allocators

Documentation

Documentation is available in docs subfolder.

How to contribute

  1. Check the list of open issues and see if you are interested in fixing any of them. If you have encountered a problem or have a feature suggestion feel free to open a new issue.
  2. Fork the main repo and start hacking up the fix. If you have problems with getting started, contact @densh to help you out.
  3. Whenever you fix an issue, add a test that shows that it was indeed fixed. If you introduce a new feature, add a new test suite with a bunch of tests that cover common use cases. If you propose a performance enhancement, include before & after results of a corresponding jmh performance benchmark run in the commit message.
  4. Fire up a pull request. Don't forget to sign the Scala CLA.

FAQs

Package last updated on 03 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc