github.com/eh-steve/goloader@v0.0.0-20240111193454-90ff3cfdae39/const.go (about) 1 package goloader 2 3 import ( 4 "unsafe" 5 ) 6 7 // size 8 const ( 9 PtrSize = 4 << (^uintptr(0) >> 63) 10 Uint32Size = int(unsafe.Sizeof(uint32(0))) 11 IntSize = int(unsafe.Sizeof(int(0))) 12 UInt64Size = int(unsafe.Sizeof(uint64(0))) 13 _FuncSize = int(unsafe.Offsetof(_func{}.nfuncdata)) + int(unsafe.Sizeof(_func{}.nfuncdata)) 14 FindFuncBucketSize = int(unsafe.Sizeof(findfuncbucket{})) 15 InvalidHandleValue = ^uintptr(0) 16 InvalidOffset = int(-1) 17 PageSize = 1 << 12 //4096 18 ) 19 20 const ( 21 EmptyString = "" 22 DefaultPkgPath = "main" 23 ZeroByte = byte(0x00) 24 ) 25 26 const ( 27 TLSNAME = "(TLS)" 28 ) 29 30 // runtime symbol 31 const ( 32 RuntimeDeferReturn = "runtime.deferreturn" 33 ) 34 35 // string match prefix/suffix 36 const ( 37 FileSymPrefix = "gofile.." 38 MainPkgPrefix = "main." 39 OsStdout = "os.Stdout" 40 FirstModulePrefix = "firstmodule." 41 DefaultStringContainerSize = 1024 * 1024 * 16 42 )