func newBucket(typ bucketType, nstk int) *bucket {
	size := unsafe.Sizeof(bucket{}) + uintptr(nstk)*unsafe.Sizeof(uintptr(0))
	switch typ {
	default:
		throw("invalid profile bucket type")
	case memProfile:
		size += unsafe.Sizeof(memRecord{})
	case blockProfile:
		size += unsafe.Sizeof(blockRecord{})
	}

	b := (*bucket)(persistentalloc(size, 0, &memstats.buckhash_sys))
	bucketmem += size
	b.typ = typ
	b.nstk = uintptr(nstk)
	return b
}
// newBucket allocates a bucket with the given type and number of stack entries.
newBucket allocates a bucket with the given type and number of stack entries.
// newBucket allocates a bucket with the given type and number of stack entries .
func newBucket(typ bucketType, nstk int) *bucket {
	size := unsafe.Sizeof(bucket{}) + uintptr(nstk)*unsafe.Sizeof(uintptr(0))
	switch typ {
	default:
		throw("invalid profile bucket type")
	case memProfile:
		size += unsafe.Sizeof(memRecord{})
	case blockProfile:
		size += unsafe.Sizeof(blockRecord{})
	}
	b := (*bucket)(persistentalloc(size, 0, &memstats.buckhash_sys))
	bucketmem += size
	b.typ = typ
	b.nstk = uintptr(nstk)
	return b
}
func newBucket ( typ bucketType , nstk int ) * bucket { size := unsafe . Sizeof ( bucket { } ) + uintptr ( nstk ) * unsafe . Sizeof ( uintptr ( 0 ) ) switch typ { default : throw ( " " ) case memProfile : size += unsafe . Sizeof ( memRecord { } ) case blockProfile : size += unsafe . Sizeof ( blockRecord { } ) } b := ( * bucket ) ( persistentalloc ( size , 0 , & memstats . buckhash_sys ) ) bucketmem += size b . typ = typ b . nstk = uintptr ( nstk ) return b }
newBucket allocates a bucket with the given type and number of stack entries.
newBucket allocates a bucket with the given type and number of stack entries .