Keep tabs on memory usage

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2018-09-25 02:35:01 +02:00
parent 83def0a52b
commit 412a5ed445
5 changed files with 24 additions and 7 deletions
@@ -52,7 +52,6 @@ var tunnelHandles map[int32]*Device
func init() {
versionString = C.CString(WireGuardGoVersion)
preallocatedBuffers = 64
roamingDisabled = true
tunnelHandles = make(map[int32]*Device)
signals := make(chan os.Signal)
@@ -0,0 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2017-2018 WireGuard LLC. All Rights Reserved.
*/
package main
/* Fit within memory limits for iOS */
const (
QueueOutboundSize = 1024
QueueInboundSize = 1024
QueueHandshakeSize = 1024
MaxSegmentSize = 1700
PreallocatedBuffersPerPool = 1024
)