Commit Graph

7 Commits (3b1b4de9033e2dd167061692c31b9231368ccb81)

Author SHA1 Message Date
Mathias Buus 0c5de1ff81 doc: fix double smalloc example
PR-URL: https://github.com/iojs/io.js/pull/413
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-14 19:00:59 +01:00
Vladimir Kurchatkin 15aa47e261 docs: fix smalloc.dispose() example
Also couple of additions about dispose and limitations of smalloc'ed
objects.

Fixes: https://github.com/joyent/node/pull/8625
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 12:58:05 -07:00
Trevor Norris f2a78de6ec doc: fix optional parameter parsing
The parameter parser specifically looked for the old bracket syntax.
This generated a lot of warnings when building the docs. Those warnings
have been fixed by changing the parsing logic.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-09-29 16:32:34 -07:00
Trevor Norris 26a795baa1 doc: fix few smalloc entries for proper formatting 2013-11-13 15:31:22 -08:00
Trevor Norris c414ec1c2c smalloc: check if object has external memory
Add HasExternalData API to check if Object has externally allocated
memory, and accompanying tests.
2013-11-13 15:29:50 -08:00
Trevor Norris cec81593d7 smalloc: allow different external array types
smalloc.alloc now accepts an optional third argument which allows
specifying the type of array that should be allocated. All available
types are now located on smalloc.Types.
2013-08-07 12:53:24 -07:00
Trevor Norris d817843d2e smalloc: create separate module
It will be confusing if later on we add Buffer#dispose(), and smalloc is
its own cpp api anyways. So instead create a new require('smalloc') to
expose the previous Buffer.alloc/dispose methods, and expose copyOnto
and kMaxLength as well.

Other changes:
* Added documentation and additional tests.
* smalloc::CopyOnto has changed from using assert() to throwing errors
  on bad argument values because it is not exposed to the user.
* Minor style fixes.
2013-07-19 13:36:13 -07:00