Bug 684039: rewrite JS LIFO allocator, avoids thrashing. (r=luke)

This commit is contained in:
Chris Leary
2011-09-22 13:22:30 -07:00
parent dda8d900f5
commit cdd34a85e8
42 changed files with 724 additions and 687 deletions

View File

@@ -46,7 +46,6 @@
#include "jsprvtd.h"
#include "jspubtd.h"
#include "jsutil.h"
#include "jsarena.h"
JS_BEGIN_EXTERN_C
@@ -505,7 +504,7 @@ DecompileValueGenerator(JSContext *cx, intN spindex, const Value &v,
*/
struct Sprinter {
JSContext *context; /* context executing the decompiler */
JSArenaPool *pool; /* string allocation pool */
LifoAlloc *pool; /* string allocation pool */
char *base; /* base address of buffer in pool */
size_t size; /* size of buffer allocated at base */
ptrdiff_t offset; /* offset of next free char in buffer */