Source File
calloc_nojemalloc.go
Belonging Package
github.com/dgraph-io/ristretto/v2/z
// Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use// of this source code is governed by a BSD-style license that can be found in// the LICENSE file.//go:build !jemalloc || !cgo// +build !jemalloc !cgopackage zimport ()// Provides versions of Calloc, CallocNoRef, etc when jemalloc is not available// (eg: build without jemalloc tag).// Calloc allocates a slice of size n.func ( int, string) []byte {return make([]byte, )}// CallocNoRef will not give you memory back without jemalloc.func ( int, string) []byte {// We do the add here just to stay compatible with a corresponding Free call.return nil}// Free does not do anything in this mode.func ( []byte) {}func () string { return "Leaks: Using Go memory" }func () {fmt.Println("Using Go memory")}// ReadMemStats doesn't do anything since all the memory is being managed// by the Go runtime.func ( *MemStats) {}
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |