joyent/node — pull request #8743 by vkurchatkin (2014-11-18 09:45:21+00:00)
Title: smalloc: don't allow to dispose typed arrays

Typed arrays behave as objects with external data in some cases, but disposing them is a bad idea:

```javascript
var smalloc = require('smalloc');

var ab = new ArrayBuffer(3);
var a1 = new Uint8Array(ab);
var a2 = new Uint8Array(ab);

for (var i = 0; i < a1.length; i++)
a1[i] = 6;

console.log(a1);
console.log(a2);

smalloc.dispose(a1);

console.log(a1);
console.log(a2);

// node(72543,0x7fff7ada2310) malloc: *** error for object 0x100f0b2f0: pointer being freed was not allocated
// *** set a breakpoint in malloc_error_break to debug
// Abort trap: 6
```

/cc @trevnorris