- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 111 for Malloc (0.14 sec)
-
tensorflow/c/eager/c_api_experimental.cc
} const void TFE_MonitoringStringGaugeCellValue( TFE_MonitoringStringGaugeCell* cell, TF_Buffer* buf) { tensorflow::string value = cell->cell.value(); void* data = tensorflow::port::Malloc(value.length()); value.copy(static_cast<char*>(data), value.length(), 0); buf->data = data; buf->length = value.length(); buf->data_deallocator = [](void* data, size_t length) { tensorflow::port::Free(data);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 11 23:52:39 UTC 2024 - 35.9K bytes - Viewed (0) -
src/runtime/runtime1.go
profstackdepth int32 // debug.malloc is used as a combined debug check // in the malloc function and should be set // if any of the below debug options is != 0. malloc bool inittrace int32 sbrk int32 // traceallocfree controls whether execution traces contain // detailed trace data about memory allocation. This value // affects debug.malloc only if it is != 0 and the execution
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 19.3K bytes - Viewed (0) -
src/runtime/mcache.go
var emptymspan mspan func allocmcache() *mcache { var c *mcache systemstack(func() { lock(&mheap_.lock) c = (*mcache)(mheap_.cachealloc.alloc()) c.flushGen.Store(mheap_.sweepgen) unlock(&mheap_.lock) }) for i := range c.alloc { c.alloc[i] = &emptymspan } c.nextSample = nextSample() return c } // freemcache releases resources associated with this
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 10K bytes - Viewed (0) -
src/runtime/os3_solaris.go
return true } //go:nosplit func semacreate(mp *m) { if mp.waitsema != 0 { return } var sem *semt // Call libc's malloc rather than malloc. This will // allocate space on the C heap. We can't call malloc // here because it could cause a deadlock. mp.libcall.fn = uintptr(unsafe.Pointer(&libc_malloc)) mp.libcall.n = 1 mp.scratch = mscratch{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 17.6K bytes - Viewed (0) -
src/cmd/cgo/internal/test/test.go
// nothing to run, just make sure this compiles. _ = C.X } // issue 6390 func test6390(t *testing.T) { p1 := C.malloc(1024) if p1 == nil { t.Fatalf("C.malloc(1024) returned nil") } p2 := C.malloc(0) if p2 == nil { t.Fatalf("C.malloc(0) returned nil") } C.free(p1) C.free(p2) } func test6472() { // nothing to run, just make sure this compiles
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 48.5K bytes - Viewed (0) -
tensorflow/c/experimental/stream_executor/stream_executor_test.cc
se_.allocate = [](const SP_Device* const device, uint64_t size, int64_t memory_space, SP_DeviceMemoryBase* const mem) { mem->struct_size = SP_DEVICE_MEMORY_BASE_STRUCT_SIZE; mem->opaque = malloc(size); mem->size = size; }; se_.deallocate = [](const SP_Device* const device, SP_DeviceMemoryBase* const mem) { EXPECT_EQ(mem->size, 2 * sizeof(int)); free(mem->opaque);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 19:54:04 UTC 2024 - 26.5K bytes - Viewed (0) -
src/runtime/trace.go
// Finish off CPU profile reading. traceStopReadCPU() // Reset debug.malloc if necessary. Note that this is set in a racy // way; that's OK. Some mallocs may still enter into the debug.malloc // block, but they won't generate events because tracing is disabled. // That is, it's OK if mallocs read a stale debug.malloc or // trace.enabledWithAllocFree value. if trace.enabledWithAllocFree {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 37.1K bytes - Viewed (0) -
src/runtime/panic.go
//go:nowritebarrierrec func startpanic_m() bool { gp := getg() if mheap_.cachealloc.size == 0 { // very early print("runtime: panic before malloc heap initialized\n") } // Disallow malloc during an unrecoverable panic. A panic // could happen in a signal handler, or in a throw, or inside // malloc itself. We want to catch if an allocation ever does // happen (even if we're not in one of these situations). gp.m.mallocing++
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 43.8K bytes - Viewed (0) -
src/cmd/cgo/doc.go
func C.GoBytes(unsafe.Pointer, C.int) []byte As a special case, C.malloc does not call the C library malloc directly but instead calls a Go helper function that wraps the C library malloc but guarantees never to return nil. If C's malloc indicates out of memory, the helper function crashes the program, like when Go itself runs out of memory. Because C.malloc cannot fail, it has no two-result form that returns errno.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 17:12:16 UTC 2024 - 42.2K bytes - Viewed (0) -
src/runtime/arena.go
} // Prevent preemption as we set up the space for a new object. // // Act like we're allocating. mp := acquirem() if mp.mallocing != 0 { throw("malloc deadlock") } if mp.gsignal == getg() { throw("malloc during signal") } mp.mallocing = 1 var ptr unsafe.Pointer if !typ.Pointers() { // Allocate pointer-less objects from the tail end of the chunk.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:44:56 UTC 2024 - 37.9K bytes - Viewed (0)