Only init the dirty head items of freelists
commit9c5c0436c63f7a7e2494e8775f44b85f5807b122
authorEdwin Smith <smith@fb.com>
Tue, 12 Jul 2016 14:08:31 +0000 (12 07:08 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Tue, 12 Jul 2016 14:15:59 +0000 (12 07:15 -0700)
tree996381ace4a8bc4e40332cc4068321b3141dadd0
parent60fcbf9a0f4a0fbafab0c641cbde280c32bd75cf
Only init the dirty head items of freelists

Summary:
If we take care to initialize items eagerly placed on the freelists,
then we can optimize initFree() by terminating the freelist traversal
when we find the first block that is already kind Free or Hole.

Reviewed By: kodafb

Differential Revision: D3488478

fbshipit-source-id: b158ecf809735f1b04f676a5a1478dc52f6e8c6e
hphp/runtime/base/memory-manager-inl.h
hphp/runtime/base/memory-manager.cpp
hphp/runtime/base/memory-manager.h