Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 150 for emallocz (0.19 sec)

  1. src/runtime/cgo/gcc_util.c

    	guards).
    	free(NULL) has a fast-path special case in TSAN, so it doesn't
    	trigger signal delivery.
    	free(malloc(0)) would work (triggering the interceptors in malloc), but
    	it also runs a bunch of user-supplied malloc hooks.
    
    	So we choose strncpy(_, _, 0): it requires an extra header,
    	but it's standard and should be very efficient.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 18:49:38 UTC 2017
    - 1.8K bytes
    - Viewed (0)
  2. src/runtime/mem_sbrk.go

    type memHdrPtr uintptr
    
    func (p memHdrPtr) ptr() *memHdr   { return (*memHdr)(unsafe.Pointer(p)) }
    func (p *memHdrPtr) set(x *memHdr) { *p = memHdrPtr(unsafe.Pointer(x)) }
    
    func memAlloc(n uintptr) unsafe.Pointer {
    	n = memRound(n)
    	var prevp *memHdr
    	for p := memFreelist.ptr(); p != nil; p = p.next.ptr() {
    		if p.size >= n {
    			if p.size == n {
    				if prevp != nil {
    					prevp.next = p.next
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  3. src/runtime/cgo/gcc_linux_arm64.c

    {
    	uintptr *pbounds;
    
    	/* The memory sanitizer distributed with versions of clang
    	   before 3.8 has a bug: if you call mmap before malloc, mmap
    	   may return an address that is later overwritten by the msan
    	   library.  Avoid this problem by forcing a call to malloc
    	   here, before we ever call malloc.
    
    	   This is only required for the memory sanitizer, so it's
    	   unfortunate that we always run it.  It should be possible
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:06:46 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. src/runtime/testdata/testprogcgo/stackswitch.c

    	char *stack1 = malloc(STACK_SIZE);
    	if (stack1 == NULL) {
    		perror("malloc");
    		exit(1);
    	}
    
    	// Allocate the second stack before freeing the first to ensure we don't get
    	// the same address from malloc.
    	//
    	// Will be freed in stackSwitchThread2.
    	stack2 = malloc(STACK_SIZE);
    	if (stack1 == NULL) {
    		perror("malloc");
    		exit(1);
    	}
    
    	if (getcontext(&uctx_switch) == -1) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 26 15:17:33 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  5. pkg/ctrlz/topics/assets/templates/mem.html

        <tr>
            <td>Lookups</td>
            <td id="Lookups">{{.Lookups}} lookups</td>
            <td>Number of pointer lookups performed by the runtime.</td>
        </tr>
    
        <tr>
            <td>Mallocs</td>
            <td id="Mallocs">{{.Mallocs}} objects</td>
            <td>Cumulative count of heap objects allocated.</td>
        </tr>
    
        <tr>
            <td>Frees</td>
            <td id="Frees">{{.Frees}} objects</td>
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testsanitizers/testdata/tsan4.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.
    
    package main
    
    // Check that calls to C.malloc/C.free do not trigger TSAN false
    // positive reports.
    
    // #cgo CFLAGS: -fsanitize=thread
    // #cgo LDFLAGS: -fsanitize=thread
    // #include <stdlib.h>
    import "C"
    
    import (
    	"runtime"
    	"sync"
    )
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 634 bytes
    - Viewed (0)
  7. test/closure.go

    	memstats := new(runtime.MemStats)
    	runtime.ReadMemStats(memstats)
    	n0 := memstats.Mallocs
    
    	x, y := newfunc(), newfunc()
    	if x(1) != 1 || y(2) != 2 {
    		println("newfunc returned broken funcs")
    		fail = true
    	}
    
    	runtime.ReadMemStats(memstats)
    	if n0 != memstats.Mallocs {
    		println("newfunc allocated unexpectedly")
    		fail = true
    	}
    
    	ff(1)
    
    	if fail {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Jul 01 17:59:50 UTC 2012
    - 1.7K bytes
    - Viewed (0)
  8. src/runtime/testdata/testprogcgo/racesig.go

    //go:build unix
    // +build unix
    
    package main
    
    // Test that an external C thread that is calling malloc can be hit
    // with SIGCHLD signals. This used to fail when built with the race
    // detector, because in that case the signal handler would indirectly
    // call the C malloc function.
    
    /*
    #include <errno.h>
    #include <signal.h>
    #include <stdint.h>
    #include <stdio.h>
    #include <stdlib.h>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 01:46:05 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testsanitizers/testdata/tsan5.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.
    
    package main
    
    // Check that calls to C.malloc/C.free do not collide with the calls
    // made by the os/user package.
    
    // #cgo CFLAGS: -fsanitize=thread
    // #cgo LDFLAGS: -fsanitize=thread
    // #include <stdlib.h>
    import "C"
    
    import (
    	"fmt"
    	"os"
    	"os/user"
    	"runtime"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 927 bytes
    - Viewed (0)
  10. src/runtime/mklockrank.go

      reflectOffs,
      timer,
      traceStrings,
      userArenaState
    # Above MALLOC are things that can allocate memory.
    < MALLOC
    # Below MALLOC is the malloc implementation.
    < fin,
      spanSetSpine,
      mspanSpecial,
      traceTypeTab,
      MPROF;
    
    # We can acquire gcBitsArenas for pinner bits, and
    # it's guarded by mspanSpecial.
    MALLOC, mspanSpecial < gcBitsArenas;
    
    # Memory profiling
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top