-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove mallocs for our lambda passing
This commit works by adding a SmallFunction class that behaves like std::function, but allocates its data inline rather than through a separate allocation. It probably could have also worked by taking a custom allocator and using the new RegionAllocator. It adds a bit more restrictions than std::function does (the types caught by the closure have to be more "trivial" than std::function supports), so some of this change is marking some types as trivial, or copying data into a trivial format from things that aren't (ex SmallVector).
- Loading branch information
Showing
4 changed files
with
81 additions
and
22 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
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