Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for sysAllocOS (0.24 sec)

  1. src/runtime/mem_aix.go

    package runtime
    
    import (
    	"unsafe"
    )
    
    // Don't split the stack as this method may be invoked without a valid G, which
    // prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		if err == _EACCES {
    			print("runtime: mmap: access denied\n")
    			exit(2)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. src/runtime/mem_bsd.go

    package runtime
    
    import (
    	"unsafe"
    )
    
    // Don't split the stack as this function may be invoked without a valid G,
    // which prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	v, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		return nil
    	}
    	return v
    }
    
    func sysUnusedOS(v unsafe.Pointer, n uintptr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. src/runtime/mem_darwin.go

    package runtime
    
    import (
    	"unsafe"
    )
    
    // Don't split the stack as this function may be invoked without a valid G,
    // which prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	v, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		return nil
    	}
    	return v
    }
    
    func sysUnusedOS(v unsafe.Pointer, n uintptr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. src/runtime/mem_windows.go

    	_ERROR_NOT_ENOUGH_MEMORY = 8
    	_ERROR_COMMITMENT_LIMIT  = 1455
    )
    
    // Don't split the stack as this function may be invoked without a valid G,
    // which prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	return unsafe.Pointer(stdcall4(_VirtualAlloc, 0, n, _MEM_COMMIT|_MEM_RESERVE, _PAGE_READWRITE))
    }
    
    func sysUnusedOS(v unsafe.Pointer, n uintptr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  5. src/runtime/mem_sbrk.go

    			}
    		}
    	}
    }
    
    func memRound(p uintptr) uintptr {
    	return alignUp(p, physPageSize)
    }
    
    func initBloc() {
    	bloc = memRound(firstmoduledata.end)
    	blocMax = bloc
    }
    
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	lock(&memlock)
    	p := memAlloc(n)
    	memCheck()
    	unlock(&memlock)
    	return p
    }
    
    func sysFreeOS(v unsafe.Pointer, n uintptr) {
    	lock(&memlock)
    	if uintptr(v)+n == bloc {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  6. src/runtime/mem_linux.go

    	"unsafe"
    )
    
    const (
    	_EACCES = 13
    	_EINVAL = 22
    )
    
    // Don't split the stack as this method may be invoked without a valid G, which
    // prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAllocOS(n uintptr) unsafe.Pointer {
    	p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, -1, 0)
    	if err != 0 {
    		if err == _EACCES {
    			print("runtime: mmap: access denied\n")
    			exit(2)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. src/runtime/mem.go

    // which prevents us from allocating more stack.
    //
    //go:nosplit
    func sysAlloc(n uintptr, sysStat *sysMemStat) unsafe.Pointer {
    	sysStat.add(int64(n))
    	gcController.mappedReady.Add(int64(n))
    	return sysAllocOS(n)
    }
    
    // sysUnused transitions a memory region from Ready to Prepared. It notifies the
    // operating system that the physical pages backing this memory region are no
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 6.7K bytes
    - Viewed (0)
Back to top