Last Comment Bug 609905 - reTempAlloc: 512k heap allocation for no purpose
: reTempAlloc: 512k heap allocation for no purpose
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
-- normal with 2 votes (vote)
: ---
Assigned To: Julian Seward [:jseward]
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: 598466
  Show dependency treegraph
Reported: 2010-11-05 08:50 PDT by Julian Seward [:jseward]
Modified: 2011-01-04 15:33 PST (History)
9 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

remove reTempAlloc (3.83 KB, patch)
2010-11-05 16:01 PDT, Julian Seward [:jseward]
n.nethercote: review+
Details | Diff | Splinter Review

Description User image Julian Seward [:jseward] 2010-11-05 08:50:44 PDT
jstracer.cpp, InitJIT():

7807:        tm->reTempAlloc = new VMAllocator();

allocates 512kb of memory at process start, but is never used.  AFAICS
reTempAlloc is redundant (nothing is ever allocated in it) and can be
done away with.  I guess it got left over from the old regexp engine.

The block stayed alive for 15.02 billion insns, almost the entire life
of the program (15.08 billion -- start browser and surf a bit).
Only 192 bytes of the block were read, and 825 written -- admin 
stuff I suspect.

  -------------------- 32 of 5000 --------------------
  max-live:    524,328 in 1 blocks
  tot-alloc:   524,328 in 1 blocks (avg size 524328.00)
  deaths:      1, at avg age 15,015,989,851
  acc-ratios:  0.00 rd, 0.00 wr  (192 b-read, 825 b-written)
     at 0x4C27ECA: operator new(unsigned long) (vg_replace_malloc.c:261)
     by 0x661D01D: js::InitJIT(js::TraceMonitor*) (jstracer.cpp:7807)
     by 0x651FBEB: JSThreadData::init() (jscntxt.cpp:497)
     by 0x652049D: js_CurrentThread(JSRuntime*) (jscntxt.cpp:588)
     by 0x652085C: js_InitContextThread(JSContext*) (jscntxt.cpp:659)
Comment 1 User image Julian Seward [:jseward] 2010-11-05 16:01:55 PDT
Created attachment 488593 [details] [diff] [review]
remove reTempAlloc
Comment 2 User image Nicholas Nethercote [:njn] 2010-11-05 19:14:16 PDT
Comment on attachment 488593 [details] [diff] [review]
remove reTempAlloc

Nice find!
Comment 3 User image Nicholas Nethercote [:njn] 2010-12-02 22:27:37 PST
Comment 5 User image christian 2011-01-04 15:33:26 PST
As per today's meeting, beta 9 will be a time-based release. Marking these all betaN+. Please move it back to beta9+ if  you believe it MUST be in the next beta (ie: trunk is in an unshippable state without this)

Note You need to log in before you can comment on or make changes to this bug.