types

package
v0.5.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryPadding

type MemoryPadding struct {
	Flag1    bool
	ShortVal int16
	Flag2    bool
	FloatVal float32
}

MemoryPadding は、メンバー定義順によってメモリのパディングが発生する構造体です.

func (MemoryPadding) Layout

func (MemoryPadding) Layout() string

type NoMemoryPadding

type NoMemoryPadding struct {
	FloatVal float32
	ShortVal int16
	Flag1    bool
	Flag2    bool
}

NoMemoryPadding は、メンバー定義順を考慮してメモリのパティングが発生しないようにしている構造体です.

func (NoMemoryPadding) Layout

func (NoMemoryPadding) Layout() string

type Struct4Bytes

type Struct4Bytes struct {
	Flag  bool
	Value int16
}

Struct4Bytes は、メンバーのサイズで見ると 3bytes なのに、メモリ上のサイズが 4bytes になる構造体です.

func (Struct4Bytes) Layout added in v0.5.17

func (Struct4Bytes) Layout() string

type Struct8Bytes

type Struct8Bytes struct {
	Flag  bool
	Value int32
}

Struct8Bytes は、メンバーのサイズで見ると 5bytes なのに、メモリ上のサイズが 8bytes になる構造体です.

func (Struct8Bytes) Layout added in v0.5.17

func (Struct8Bytes) Layout() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL