Skip to content

v1.0.0

Latest

Choose a tag to compare

@KimMachineGun KimMachineGun released this 25 Aug 00:20

After four years of iteration through v0.x, automemlimit v1.0.0 is finally here! This release simplifies the public API and improves cgroup memory limit detection.

Key changes from v0.x:

  • memlimit.Set replaces the memlimit.SetGoMemLimit* functions
  • memlimit.Set returns the previous GOMEMLIMIT instead of 0 when configuration is skipped or an error occurs
  • memlimit.Set sets GOMEMLIMIT to math.MaxInt64 when the provider returns memlimit.ErrNoLimit
  • memlimit.FromCgroup replaces the version-specific cgroup providers
  • memlimit.WithEnv, AUTOMEMLIMIT_EXPERIMENT, and AUTOMEMLIMIT_DEBUG were removed
    • Use memlimit.FromSystem for system memory fallback
  • memlimit.WithRefreshInterval now takes a context.Context for cancellation
  • memlimit.WithMin was added to set a lower bound for GOMEMLIMIT