Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
channel tests: don't reset allocated bytes counter
The ALLOCATED atomic is used by the golang::select2 test to track the total size of the current heap allocations. It is reset to 0 during the test, which can cause underflow if existing allocations are deallocated afterwards. The golang test this is copied from doesn't reset the alloc stats, and it doesn't affect the test result, since only the difference in bytes allocated is asserted. So don't reset the ALLOCATED counter during the test. Also only sample ALLOCATED once at the end of the test, to avoid its value being inconsistent between the 2 loads.
- Loading branch information