]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/mbitmap.go
runtime: implement Pinner API for object pinning
[gostls13.git] / src / runtime / mbitmap.go
index 80670d49ef0031c724f1c9a781b59261eb4d2666..a24287288472282d388274b3ba110cb31c380e4b 100644 (file)
@@ -202,6 +202,10 @@ func (s *mspan) isFree(index uintptr) bool {
 // n must be within [0, s.npages*_PageSize),
 // or may be exactly s.npages*_PageSize
 // if s.elemsize is from sizeclasses.go.
+//
+// nosplit, because it is called by objIndex, which is nosplit
+//
+//go:nosplit
 func (s *mspan) divideByElemSize(n uintptr) uintptr {
        const doubleCheck = false
 
@@ -215,6 +219,9 @@ func (s *mspan) divideByElemSize(n uintptr) uintptr {
        return q
 }
 
+// nosplit, because it is called by other nosplit code like findObject
+//
+//go:nosplit
 func (s *mspan) objIndex(p uintptr) uintptr {
        return s.divideByElemSize(p - s.base())
 }