diff options
author | alon@honor <none@none> | 2010-09-25 20:26:16 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-09-25 20:26:16 -0700 |
commit | b94c061e122f155cc5c1262a1bb470cb49ee04b4 (patch) | |
tree | 134322b7ed16b9a3ed805d4663e3233625d5ef7a /src/utility.js | |
parent | 481dec302bfb02b574741c4e505d274718854dff (diff) |
optional memory alignment that matches c/c++; used in clang, not in llvm-gcc
Diffstat (limited to 'src/utility.js')
-rw-r--r-- | src/utility.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utility.js b/src/utility.js index e4f20b7e..8907eb91 100644 --- a/src/utility.js +++ b/src/utility.js @@ -79,6 +79,12 @@ function range(size) { return ret; } +function zeros(size) { + var ret = []; + for (var i = 0; i < size; i++) ret.push(0); + return ret; +} + function searchable() { if (typeof arguments[0] === 'object') arguments = arguments[0]; var ret = {}; |