densh / scala-offheap

Experimental type-safe off-heap memory for Scala.
BSD 3-Clause "New" or "Revised" License
532 stars 38 forks source link

Add support for reallocate and free for regions #77

Closed densh closed 9 years ago

densh commented 9 years ago

Those two don't attempt to perform any deallocation but rather just delay the clean-up until the region is closed.

Previous behaviour of throwing an exception wasn't quite useful as one had to effectively always special case two types of allocators for any allocator-generic code.

Additionally this introduces a new exception to replace IllegalArgumentException when a method on a closed region is being called.

Review by @arosenberger