1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-16 15:59:58 -04:00

reduce memory usage of vmess internal objects

This commit is contained in:
Darien Raymond
2018-04-14 15:05:49 +02:00
parent da0568d8d0
commit 0caf2a004b
5 changed files with 53 additions and 62 deletions

View File

@@ -42,7 +42,7 @@ type indexTimePair struct {
timeInc uint32
}
func NewTimedUserValidator(hasher protocol.IDHash) protocol.UserValidator {
func NewTimedUserValidator(hasher protocol.IDHash) *TimedUserValidator {
tuv := &TimedUserValidator{
users: make([]*user, 0, 16),
userHash: make(map[[16]byte]indexTimePair, 1024),