On Tue Feb 14 11:16:32 2023 +0000, Jinoh Kang wrote:
The acq/rel barrier on the `enabled` flag is protecting `compat_info` (i.e. `compat_info := LFH` happens-before `enabled := TRUE`), so that a caller that observes LFH block allocation (alloc request succeeds without heap lock) will never observe `HEAP_STD` when it queries the heap. This requirement should be documented in the release side, along with a note that says the the `compat_info` write and `enabled` write should not change order.
Thanks, that makes sense. Yes, having that documented in the code would be great.