Update dependencies and move ts-node to prod for now

This commit is contained in:
dcodeIO
2018-02-09 10:59:47 +01:00
parent ad92d91f01
commit cd9a3b5b95
3 changed files with 43 additions and 65 deletions

View File

@ -475,13 +475,15 @@ export function allocate_memory(size: usize): usize {
/** Frees the chunk of memory at the specified address. */
export function free_memory(data: usize): void {
var root = ROOT;
if (root && data) {
var block = changetype<Block>(data - Block.INFO);
var blockInfo = block.info;
assert(!(blockInfo & FREE)); // must be used
block.info = blockInfo | FREE;
root.insert(changetype<Block>(data - Block.INFO));
if (data) {
var root = ROOT;
if (root) {
var block = changetype<Block>(data - Block.INFO);
var blockInfo = block.info;
assert(!(blockInfo & FREE)); // must be used
block.info = blockInfo | FREE;
root.insert(changetype<Block>(data - Block.INFO));
}
}
}