aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
authoralon@honor <none@none>2010-09-29 20:26:56 -0700
committeralon@honor <none@none>2010-09-29 20:26:56 -0700
commit335bd8e73d093b10c38036072186254531e8c099 (patch)
tree3615986bd0fe5aa3552fc8f8368c0b017bc05d1e /src/postamble.js
parent6cd9fc881bce4f51f5c548f12d6ec8f5b235aedf (diff)
clean up memory allocation
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/postamble.js b/src/postamble.js
index a34370b2..f47f3d42 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -2,19 +2,21 @@
// === Auto-generated postamble setup entry stuff ===
function run(args) {
+ __initializeRuntime__();
+
var argc = args.length+1;
function pad() {
for (var i = 0; i < QUANTUM_SIZE-1; i++) {
argv.push(0);
}
}
- var argv = [Pointer_make(intArrayFromString("/bin/this.program")) ];
+ var argv = [Pointer_make(intArrayFromString("/bin/this.program"), null, ALLOC_UNFREEABLE) ];
pad();
for (var i = 0; i < argc-1; i = i + 1) {
- argv.push(Pointer_make(intArrayFromString(args[i])));
+ argv.push(Pointer_make(intArrayFromString(args[i]), null, ALLOC_UNFREEABLE));
pad();
}
- argv = Pointer_make(argv);
+ argv = Pointer_make(argv, null, ALLOC_UNFREEABLE);
__globalConstructor__();