- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 195 for Malloc (0.13 sec)
-
src/cmd/cgo/internal/testerrors/testdata/err2.go
typedef void v; void F(v** p) {} void fvi(void *p, int x) {} void fppi(int** p) {} int i; void fi(int i) {} */ import "C" import ( "unsafe" ) func main() { s := "" _ = s C.malloc(s) // ERROR HERE x := (*C.bar_t)(nil) C.foop = x // ERROR HERE // issue 13129: used to output error about C.unsignedshort with CC=clang var x1 C.ushort x1 = int(0) // ERROR HERE: C\.ushort
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 2.5K 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/internal/trace/testdata/testprog/stress-start-stop.go
go func() { runtime.LockOSThread() for { select { case <-done: return default: runtime.Gosched() } } }() runtime.GC() // Trigger GC from malloc. n := 512 for i := 0; i < n; i++ { _ = make([]byte, 1<<20) } // Create a bunch of busy goroutines to load all Ps. for p := 0; p < 10; p++ { wg.Add(1) go func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/string_utils.cc
int32_t bytes = data_.size() // size of content + sizeof(int32_t) * (num_strings + 2); // size of header // Caller will take ownership of buffer. *buffer = reinterpret_cast<char*>(malloc(bytes)); if (*buffer == nullptr) { return -1; } // Set num of string // // NOTE: The string buffer is accessed here as if it's native endian (instead
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:41:49 UTC 2024 - 2.9K bytes - Viewed (0) -
tensorflow/c/c_test.c
} char file_name[100]; time_t t = time(NULL); snprintf(file_name, sizeof(file_name), "test-%d-%ld.txt", getpid(), t); size_t length = 2 + strlen(path) + strlen(file_name); char* full_path = malloc(length); snprintf(full_path, length, "%s/%s", path, file_name); TF_WritableFileHandle* h; TF_Status* status = TF_NewStatus(); TF_NewWritableFile(full_path, &h, status); if (TF_GetCode(status) != TF_OK) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:50:35 UTC 2024 - 2.8K bytes - Viewed (0) -
src/syscall/exec_libc.go
// they might have been locked at the time of the fork. This means // no rescheduling, no malloc calls, and no new stack segments. // // We call hand-crafted syscalls, implemented in // ../runtime/syscall_solaris.go, rather than generated libc wrappers // because we need to avoid lazy-loading the functions (might malloc, // split the stack, or acquire mutexes). We can't call RawSyscall
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 29 18:51:35 UTC 2023 - 8.2K 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) -
src/cmd/cgo/internal/testerrors/errors_test.go
} }) } } func TestMallocCrashesOnNil(t *testing.T) { testenv.MustHaveCGO(t) testenv.MustHaveGoRun(t) t.Parallel() cmd := exec.Command("go", "run", path("malloc.go")) out, err := cmd.CombinedOutput() if err == nil { t.Logf("%#q:\n%s", strings.Join(cmd.Args, " "), out) t.Fatalf("succeeded unexpectedly") } } func TestNotMatchedCFunction(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 4K bytes - Viewed (0) -
src/runtime/mksizeclasses.go
// Copyright 2016 The Go 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 ignore // Generate tables for small malloc size classes. // // See malloc.go for overview. // // The size classes are chosen so that rounding an allocation // request up to the next size class wastes at most 12.5% (1.125x). //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 20:31:27 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/debugging/mlir_dump_test.cc
mlir::OpBuilder builder(&ctx); auto module_op = builder.create<mlir::ModuleOp>(builder.getUnknownLoc()); // Destroy by calling destroy() to avoid memory leak since it is allocated // with malloc(). const absl::Cleanup module_op_cleanup = [module_op] { module_op->destroy(); }; const mlir::LogicalResult result = pm.run(module_op); EXPECT_FALSE(failed(result));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 14 03:17:14 UTC 2024 - 6.4K bytes - Viewed (0)