]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/mgc.go
runtime: call enableMetadataHugePages and its callees on the systemstack
[gostls13.git] / src / runtime / mgc.go
index b791acd163d67dfb11b9fd783bef96f12840f12b..c8a58de969f3edabd90e0e927c6edde63752084a 100644 (file)
@@ -1190,7 +1190,9 @@ func gcMarkTermination() {
 
        // Enable huge pages on some metadata if we cross a heap threshold.
        if gcController.heapGoal() > minHeapForMetadataHugePages {
-               mheap_.enableMetadataHugePages()
+               systemstack(func() {
+                       mheap_.enableMetadataHugePages()
+               })
        }
 
        semrelease(&worldsema)