diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-17 14:58:14 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-17 14:58:14 -0700 |
commit | 24961f556ee5adebe90996736f86d764c6acbb48 (patch) | |
tree | e96fc0f4782d33d815529de145cefb86e34f2745 | |
parent | 4231ee1aecba9c1f62a87389fcba851c74dfd687 (diff) |
allocate() docs
-rw-r--r-- | src/preamble.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index b3cfca85..61880f12 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -466,6 +466,12 @@ Module['ALLOC_NORMAL'] = ALLOC_NORMAL; Module['ALLOC_STACK'] = ALLOC_STACK; Module['ALLOC_STATIC'] = ALLOC_STATIC; +// @slab: An array of data, or a number. If a number, then the size of the block to allocate, +// in *bytes* (note that this is sometimes confusing: the next parameter does not +// affect this!) +// @types: Either an array of types, one for each byte (or 0 if no type at that position), +// or a single type which is used for the entire block +// @allocator: How to allocate memory, see ALLOC_* function allocate(slab, types, allocator) { var zeroinit, size; if (typeof slab === 'number') { |