github.com/tursom/GoCollections@v0.3.10/lang/StackTrace_test.go (about) 1 /* 2 * Copyright (c) 2022 tursom. All rights reserved. 3 * Use of this source code is governed by a GPL-3 4 * license that can be found in the LICENSE file. 5 */ 6 7 package lang 8 9 import ( 10 "fmt" 11 "testing" 12 "unsafe" 13 ) 14 15 func TestGetStackTrace(t *testing.T) { 16 fmt.Println(unsafe.Sizeof(StackTrace{})) 17 fmt.Println(unsafe.Sizeof(make([]StackTrace, 0, 16))) 18 fmt.Println(unsafe.Sizeof(make([]StackTrace, 0, 16)) + unsafe.Sizeof(StackTrace{})*16) 19 }