1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

reduce memory footprint in kcp

This commit is contained in:
Darien Raymond 2016-11-19 01:49:54 +01:00
parent ed780951aa
commit ac2f62b239
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -73,7 +73,7 @@ func (this *Config) GetSendingInFlightSize() uint32 {
}
func (this *Config) GetSendingBufferSize() uint32 {
return this.GetSendingInFlightSize() + this.WriteBuffer.GetSize()/this.Mtu.GetValue()
return this.WriteBuffer.GetSize() / this.Mtu.GetValue()
}
func (this *Config) GetReceivingInFlightSize() uint32 {
@ -85,7 +85,7 @@ func (this *Config) GetReceivingInFlightSize() uint32 {
}
func (this *Config) GetReceivingBufferSize() uint32 {
return this.GetReceivingInFlightSize() + this.ReadBuffer.GetSize()/this.Mtu.GetValue()
return this.ReadBuffer.GetSize() / this.Mtu.GetValue()
}
func init() {