MCPcopy Index your code
hub / github.com/RoaringBitmap/roaring / cloneCopyOnWriteContainers

Method cloneCopyOnWriteContainers

roaringarray.go:293–300  ·  view source on GitHub ↗

clone all containers which have needCopyOnWrite set to true This can be used to make sure it is safe to munmap a []byte that the roaring array may still have a reference to.

()

Source from the content-addressed store, hash-verified

291// This can be used to make sure it is safe to munmap a []byte
292// that the roaring array may still have a reference to.
293func (ra *roaringArray) cloneCopyOnWriteContainers() {
294 for i, needCopyOnWrite := range ra.needCopyOnWrite {
295 if needCopyOnWrite {
296 ra.containers[i] = ra.containers[i].clone()
297 ra.needCopyOnWrite[i] = false
298 }
299 }
300}
301
302// unused function:
303//func (ra *roaringArray) containsKey(x uint16) bool {

Callers 1

Calls 1

cloneMethod · 0.65

Tested by

no test coverage detected