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 a method to detect if unsafe is supported #94

Closed mdedetrich closed 8 years ago

mdedetrich commented 8 years ago

Certain environments (such as Google App Engine) disallow the use of sun.misc.unsafe due to security issues. It would be great if scala-offheap provided a very simple function that returns a boolean to see if unsafe is supported (and hence offheap can be used)

densh commented 8 years ago

Sounds good. I think offheap.Memory module is a good place for a check like that.