forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SmartAllocate the first four HphpArray size classes (8-64).
Using SmartAllocator instead of malloc for these auxilary buffers reduces fragmentation of malloc's small-size arenas, and avoids the need to free at request-end. This diff factors allocData() out of reallocData(); allocData is only for first-time allocations and reallocData is only for growing the array buffer. Each smart-allocated size class has its own SmartAllocator, and allocating and freeing these requires some branchy logic; I tried to keep the boilerplate to a minimum.
- Loading branch information
1 parent
0de1c88
commit 89ef486
Showing
3 changed files
with
190 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters