[automerge] C2Allocator: protetct memory mappings from race condition 2p: 5cbca291a6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/17806584

Bug: 213850092
Change-Id: I815c01ebacce76f5786eec5caf66df05ef6458f3
Merged-In: Icf6d00491438176e9092b67974a9388e803ac130