 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchBitSize ¶ added in v0.289.0
func ArchBitSize() int
ArchBitSize returns the current Architecture's supported bit size.
In this context, `unsafe.Sizeof(ptr)` returns the size (in bytes) of a variable or zero-sized type.
For pointer types like `uintptr`, this will return either 4 (for a 32-bit architecture) or 8 (for a 64-bit architecture), because those are the standard sizes that pointers occupy in memory for these architectures.
By multiplying the result by 8 (`sizeOfPtr*8`), we're converting bytes to bits, because there are 8 bits in one byte.
In other words:
- If your machine is 32 bit (and thus `uintptr` size is 4 bytes) - `4 * 8 = 32` - If your machine is 64 bit (and thus `uintptr` size is 8 bytes) - `8 * 8 = 64`
This multiplication gives you the number of bits that a pointer uses, which can be used as an indication of whether the system is running a 32-bit or 64-bit version of the Go runtime.
func RegisterTraceException ¶ added in v0.289.0
Types ¶
This section is empty.