Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 284 for Malloc (0.28 sec)

  1. 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)
  2. src/runtime/cgo/gcc_freebsd_amd64.c

    x_cgo_init(G *g, void (*setg)(void*))
    {
    	uintptr *pbounds;
    
    	// Deal with memory sanitizer/clang interaction.
    	// See gcc_linux_amd64.c for details.
    	setg_gcc = setg;
    	pbounds = (uintptr*)malloc(2 * sizeof(uintptr));
    	if (pbounds == NULL) {
    		fatalf("malloc failed: %s", strerror(errno));
    	}
    	_cgo_set_stacklo(g, pbounds);
    	free(pbounds);
    }
    
    void
    _cgo_sys_thread_start(ThreadStart *ts)
    {
    	pthread_attr_t attr;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:06:46 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  3. src/internal/msan/nomsan.go

    //go:build !msan
    
    package msan
    
    import (
    	"unsafe"
    )
    
    const Enabled = false
    
    func Read(addr unsafe.Pointer, sz uintptr) {
    }
    
    func Write(addr unsafe.Pointer, sz uintptr) {
    }
    
    func Malloc(addr unsafe.Pointer, sz uintptr) {
    }
    
    func Free(addr unsafe.Pointer, sz uintptr) {
    }
    
    func Move(dst, src unsafe.Pointer, sz uintptr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 20:50:21 UTC 2024
    - 483 bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testerrors/ptr_test.go

    		c: `#include <stdlib.h>
    		    char **f14a() { return malloc(sizeof(char*)); }
    		    void f14b(char **p) {}`,
    		body:      `p := C.f14a(); *p = new(C.char); C.f14b(p)`,
    		fail:      true,
    		expensive: true,
    	},
    	{
    		// Storing a pinned Go pointer into C memory should succeed.
    		name: "barrierpinnedok",
    		c: `#include <stdlib.h>
    		    char **f14a2() { return malloc(sizeof(char*)); }
    		    void f14b2(char **p) {}`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 16:07:49 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  5. test/fixedbugs/issue34968.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    // #include <stdlib.h>
    import "C"
    
    func main() {
    	C.malloc(100)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 289 bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. src/cmd/cgo/out.go

    const char *_cgoPREFIX_Cfunc_CString(struct __go_string s) {
    	char *p = malloc(s.__length+1);
    	if(p == NULL)
    		runtime_throw("runtime: C malloc failed");
    	memmove(p, s.__data, s.__length);
    	p[s.__length] = 0;
    	return p;
    }
    
    void *_cgoPREFIX_Cfunc_CBytes(struct __go_open_array b) {
    	char *p = malloc(b.__count);
    	if(p == NULL)
    		runtime_throw("runtime: C malloc failed");
    	memmove(p, b.__values, b.__count);
    	return p;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testsanitizers/testdata/tsan15.go

    static void *sendthr(void *arg) {
    	pthread_t th = *(pthread_t*)arg;
    	while (1) {
    		int r = pthread_kill(th, SIGWINCH);
    		if (r < 0)
    			break;
    	}
    	return 0;
    }
    
    static void foo() {
    	pthread_t *th = malloc(sizeof(pthread_t));
    	pthread_t th2;
    	pthread_create(th, 0, thr, 0);
    	pthread_create(&th2, 0, sendthr, th);
    	pthread_join(*th, 0);
    }
    */
    import "C"
    
    import (
    	"time"
    )
    
    //export go_callback
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 21:14:49 UTC 2024
    - 968 bytes
    - Viewed (0)
Back to top