since the two MR clearly overlap (yet complement each other), how to you want to proceed? shall we merge them into a single one ?
I think that MR has a bigger part which is unrelated here, probably merging won't increase the chances for this to get in. You are already introducing a special memory allocation handling somewhat similar to the last patch in that MR. I'd suggest that maybe you can incorporate tests from there: HeapSize at correct offset (so that matches Windows and your implementation) and element count (if applicable, maybe there is no such for tls array entries you are changing)?