Index: net/socket/socket_bio_adapter.cc |
diff --git a/net/socket/socket_bio_adapter.cc b/net/socket/socket_bio_adapter.cc |
index 1241bae6f90a4412d8b9c4c0e455d8704ad67c98..84b8874bdc36ce1809b8ec84aa40e292534c31c9 100644 |
--- a/net/socket/socket_bio_adapter.cc |
+++ b/net/socket/socket_bio_adapter.cc |
@@ -53,6 +53,16 @@ bool SocketBIOAdapter::HasPendingReadData() { |
return read_result_ > 0; |
} |
+size_t SocketBIOAdapter::GetAllocationSize() const { |
+ size_t effective_size = 0; |
Primiano Tucci (use gerrit)
2016/12/06 17:06:28
just a super minor comment: in memory-infra contex
xunjieli
2016/12/06 18:36:08
Done.
|
+ if (read_buffer_) |
+ effective_size += read_buffer_capacity_; |
+ |
+ if (write_buffer_) |
+ effective_size += write_buffer_capacity_; |
+ return effective_size; |
+} |
+ |
int SocketBIOAdapter::BIORead(char* out, int len) { |
if (len <= 0) |
return len; |