371 static int compare(ProfilerNode** a, ProfilerNode** b) { |
371 static int compare(ProfilerNode** a, ProfilerNode** b) { |
372 return (*b)->total_ticks() - (*a)->total_ticks(); |
372 return (*b)->total_ticks() - (*a)->total_ticks(); |
373 } |
373 } |
374 }; |
374 }; |
375 |
375 |
376 void* ProfilerNode::operator new(size_t size, ThreadProfiler* tp){ |
376 void* ProfilerNode::operator new(size_t size, ThreadProfiler* tp) throw() { |
377 void* result = (void*) tp->area_top; |
377 void* result = (void*) tp->area_top; |
378 tp->area_top += size; |
378 tp->area_top += size; |
379 |
379 |
380 if (tp->area_top > tp->area_limit) { |
380 if (tp->area_top > tp->area_limit) { |
381 fatal("flat profiler buffer overflow"); |
381 fatal("flat profiler buffer overflow"); |