- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 190 for nalloc (0.12 sec)
-
src/runtime/mfixalloc.go
// Fixed-size object allocator. Returned memory is not zeroed. // // See malloc.go for overview. package runtime import ( "runtime/internal/sys" "unsafe" ) // fixalloc is a simple free-list allocator for fixed size objects. // Malloc uses a FixAlloc wrapped around sysAlloc to manage its // mcache and mspan objects. // // Memory returned by fixalloc.alloc is zeroed by default, but the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 24 20:28:25 UTC 2023 - 3.1K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/testdata/malloc.go
// causes it to fail. if runtime.GOOS == "dragonfly" { size = C.size_t(0x7fffffff << (32 * (^uintptr(0) >> 63))) } p := C.malloc(size) if p == nil { fmt.Println("malloc: C.malloc returned nil") // Just exit normally--the test script expects this // program to crash, so exiting normally indicates failure. }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 766 bytes - Viewed (0) -
src/testing/allocs_test.go
var global any var allocsPerRunTests = []struct { name string fn func() allocs float64 }{ {"alloc *byte", func() { global = new(*byte) }, 1}, {"alloc complex128", func() { global = new(complex128) }, 1}, {"alloc float64", func() { global = new(float64) }, 1}, {"alloc int32", func() { global = new(int32) }, 1}, {"alloc byte", func() { global = new(byte) }, 1}, } func TestAllocsPerRun(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 817 bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/conc_alloc_test.go
} } else if alloc >= item.upperBound { if allocs[idx] != item.upperBound { t.Fatalf("For requiredSum=%v, %s classes=%#+v got solution %v, %v in which item %d should be its upper bound but is not", requiredSum, style, classes, allocs, fairProp, idx) } } else if f64RelDiff(alloc, allocs[idx]) > fpSlack {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 07 18:17:27 UTC 2022 - 5.3K bytes - Viewed (0) -
platforms/documentation/docs/src/snippets/native-binaries/cunit/groovy/libs/cunit/2.1-2/include/CUnit/MyMem.h
#else /* MEMTRACE */ /** Standard calloc() if MEMTRACE not defined. */ #define CU_CALLOC(x, y) calloc((x), (y)) /** Standard malloc() if MEMTRACE not defined. */ #define CU_MALLOC(x) malloc((x)) /** Standard free() if MEMTRACE not defined. */ #define CU_FREE(x) free((x)) /** Standard realloc() if MEMTRACE not defined. */ #define CU_REALLOC(x, y) realloc((x), (y))
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Nov 27 17:53:42 UTC 2023 - 4K bytes - Viewed (0) -
src/strconv/strconv_test.go
Buffer: make([]byte, 1024), } checkNoAllocs := func(f func()) func(t *testing.T) { return func(t *testing.T) { t.Helper() if allocs := testing.AllocsPerRun(runsPerTest, f); allocs != 0 { t.Errorf("got %v allocs, want 0 allocs", allocs) } } } t.Run("Atoi", checkNoAllocs(func() { Sink.Int, Sink.Error = Atoi(string(bytes.Number)) })) t.Run("ParseBool", checkNoAllocs(func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 20:29:22 UTC 2022 - 4.7K bytes - Viewed (0) -
src/runtime/mpagecache.go
return c.base + i*pageSize, uintptr(scav) * pageSize } return c.allocN(npages) } // allocN is a helper which attempts to allocate npages worth of pages // from the cache. It represents the general case for allocating from // the page cache. // // Returns a base address and the amount of scavenged memory in the // allocated region in bytes. func (c *pageCache) allocN(npages uintptr) (uintptr, uintptr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 19 14:30:00 UTC 2023 - 5.6K bytes - Viewed (0) -
src/encoding/gob/timing_test.go
} }) if allocs != 0 { t.Fatalf("mallocs per encode of type Bench: %v; wanted 0\n", allocs) } } func TestCountDecodeMallocs(t *testing.T) { if testing.Short() { t.Skip("skipping malloc count in short mode") } if runtime.GOMAXPROCS(0) > 1 { t.Skip("skipping; GOMAXPROCS>1") } const N = 1000 var buf bytes.Buffer enc := NewEncoder(&buf)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 04 07:16:59 UTC 2023 - 6.5K bytes - Viewed (0) -
src/path/path_test.go
if testing.Short() { t.Skip("skipping malloc count in short mode") } if runtime.GOMAXPROCS(0) > 1 { t.Log("skipping AllocsPerRun checks; GOMAXPROCS>1") return } for _, test := range cleantests { allocs := testing.AllocsPerRun(100, func() { Clean(test.result) }) if allocs > 0 { t.Errorf("Clean(%q): %v allocs, want zero", test.result, allocs) } } } type SplitTest struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 13 01:12:09 UTC 2020 - 4.6K bytes - Viewed (0) -
test/codegen/alloc.go
Iskander Sharipov <******@****.***> 1546022404 +0300
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 26 23:08:15 UTC 2019 - 902 bytes - Viewed (0)