|
|
@@ -11,6 +11,8 @@ import (
|
|
|
"maps"
|
|
|
"net"
|
|
|
"reflect"
|
|
|
+ "runtime"
|
|
|
+ "runtime/debug"
|
|
|
"slices"
|
|
|
"sort"
|
|
|
"strconv"
|
|
|
@@ -187,6 +189,12 @@ func (ms *mapSession) HandleNonKeepAliveMapResponse(ctx context.Context, resp *t
|
|
|
// our UpdateFullNetmap call). This is the part we tried to avoid but
|
|
|
// some field mutations (especially rare ones) aren't yet handled.
|
|
|
|
|
|
+ if runtime.GOOS == "ios" {
|
|
|
+ // Memory is tight on iOS. Free what we can while we
|
|
|
+ // can before this potential burst of in-use memory.
|
|
|
+ debug.FreeOSMemory()
|
|
|
+ }
|
|
|
+
|
|
|
nm := ms.netmap()
|
|
|
ms.lastNetmapSummary = nm.VeryConcise()
|
|
|
ms.occasionallyPrintSummary(ms.lastNetmapSummary)
|