Update J7: Throw bad_alloc in alloc paths.
Merge pull request #16 from samuelkgutierrez/master

Update J7: Throw bad_alloc in alloc paths.