mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-29 22:29:42 +07:00
optimize(memory): reuse kernel lpm tries in userspace
This commit is contained in:
@ -26,6 +26,7 @@ import (
|
||||
"net/netip"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@ -322,6 +323,9 @@ func NewControlPlane(
|
||||
c.dnsUpstream.FinishInitCallback = c.finishInitDnsUpstreamResolve
|
||||
// Try to invoke once to avoid dns leaking at the very beginning.
|
||||
_, _ = c.dnsUpstream.GetUpstream()
|
||||
|
||||
// Call GC to release memory.
|
||||
runtime.GC()
|
||||
return c, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user