Post large deallocations to original thread (#441)

* Post large deallocations to original thread

This change sets all large allocations to be owned by the originating
thread. This means they will be messaged back to the original thread
before they can be reused.

The following reason for making this change:
* This will improve producer/consumer apps involving large allocations.
* It enables the implementation of a more complex chunk allocator that
reassembles chunks.
* It addresses an issue with compartmentalisation where the handling of
large allocations can result in meta-data ownership changing.
This commit is contained in:
Matthew Parkinson
2021-12-17 14:08:08 +00:00
committed by GitHub
parent 3fb7c98364
commit 61314f2260
6 changed files with 78 additions and 75 deletions

View File

@@ -36,7 +36,7 @@ int main(int argc, char** argv)
failed = true;
}
bool opt_mod_0 = divisible_by_sizeclass(size_class, offset);
bool opt_mod_0 = is_start_of_object(sc, offset);
if (opt_mod_0 != mod_0)
{
std::cout << "rsize " << rsize << " offset " << offset