Runaway malloc memory usage in this simple JSC program
Created attachment 278865 [details] Patch
Created attachment 278866 [details] Patch
Comment on attachment 278866 [details] Patch r=me
Committed r200884: <http://trac.webkit.org/changeset/200884>
<rdar://problem/25942874>
BTW, here is the program: #include <JavaScriptCore/JavaScriptCore.h> #include <stdio.h> #include <sys/time.h> static double currentTime() { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec + tv.tv_usec / 1000. / 1000.; } int main(int argc, char** argv) { JSContextGroupRef group; double before, after; unsigned i; group = JSContextGroupCreate(); before = currentTime(); for (i = 0; i < 100000; ++i) JSGlobalContextRelease(JSGlobalContextCreateInGroup(group, NULL)); after = currentTime(); printf("That took %lf ms.\n", (after - before) * 1000.); return 0; }