github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/memsys/deadbeef_on.go (about)

     1  //go:build deadbeef
     2  
     3  // Package memsys provides memory management and slab/SGL allocation with io.Reader and io.Writer interfaces
     4  // on top of scatter-gather lists of reusable buffers.
     5  /*
     6   * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
     7   */
     8  package memsys
     9  
    10  const (
    11  	deadBEEF = "DEADBEEF"
    12  )
    13  
    14  func deadbeef(b []byte) {
    15  	l := len(b)
    16  	for i := 0; i < l; i += len(deadBEEF) {
    17  		copy(b[i:], deadBEEF)
    18  	}
    19  }