- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for takeFromFront (0.51 sec)
-
src/runtime/mranges.go
} else if a.base.lessThan(b.base) && b.base.lessThan(a.limit) { a.limit = b.base } return a } // takeFromFront takes len bytes from the front of the address range, aligning // the base to align first. On success, returns the aligned start of the region // taken and true. func (a *addrRange) takeFromFront(len uintptr, align uint8) (uintptr, bool) { base := alignUp(a.base.addr(), uintptr(align)) + len if base > a.limit.addr() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 14.5K bytes - Viewed (0) -
src/runtime/arena.go
// Allocate pointer-less objects from the tail end of the chunk. v, ok := s.userArenaChunkFree.takeFromBack(size, typ.Align_) if ok { ptr = unsafe.Pointer(v) } } else { v, ok := s.userArenaChunkFree.takeFromFront(size, typ.Align_) if ok { ptr = unsafe.Pointer(v) } } if ptr == nil { // Failed to allocate. mp.mallocing = 0 releasem(mp) return nil } if s.needzero != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:44:56 UTC 2024 - 37.9K bytes - Viewed (0)