- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for mallocgc (0.05 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: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 35.9K bytes - Viewed (0) -
tensorflow/c/c_api_experimental.cc
*len = debug_str.size(); char* ret = static_cast<char*>(malloc(*len + 1)); memcpy(ret, debug_str.c_str(), *len + 1); return ret; } char* TF_FunctionDebugString(TF_Function* func, size_t* len) { const auto& debug_str = DebugString(func->record->fdef()); *len = debug_str.size(); char* ret = static_cast<char*>(malloc(*len + 1)); memcpy(ret, debug_str.c_str(), *len + 1); return ret; }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 29.5K 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: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 01 22:52:54 UTC 2024 - 44K bytes - Viewed (0) -
src/cmd/cgo/ast.go
if goname == "errno" { error_(sel.Pos(), "cannot refer to errno directly; see documentation") return } if goname == "_CMalloc" { error_(sel.Pos(), "cannot refer to C._CMalloc; use C.malloc") return } if goname == "malloc" { goname = "_CMalloc" } name := f.Name[goname] if name == nil { name = &Name{ Go: goname, } f.Name[goname] = name f.NamePos[name] = sel.Pos() }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 14 15:47:06 UTC 2024 - 14.3K bytes - Viewed (0)