Comments (4)
heap profile: 82: 9868976 [40409: 40811376] @ heap/1048576
1: 3719168 [1: 3719168] @ 0x8509e8 0x8516bc 0x460391
# 0x8509e7 github.com/davyxu/cellnet.(*Pipe).Pick+0x1a7 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/pipe.go:48
# 0x8516bb github.com/davyxu/cellnet.(*eventQueue).StartLoop.func1+0x7b /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/queue.go:87
1: 3719168 [1: 3719168] @ 0x8507c6 0x850b89 0x850f60 0x850f00 0x85b9ba 0x859306 0x922fb4 0x460391
# 0x8507c5 github.com/davyxu/cellnet.(*Pipe).Add+0xf5 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/pipe.go:17
# 0x850b88 github.com/davyxu/cellnet.(*eventQueue).Post+0x48 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/queue.go:57
# 0x850f5f github.com/davyxu/cellnet.QueuedCall+0x3f /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/queue.go:155
# 0x850eff github.com/davyxu/cellnet.SessionQueuedCall+0x7f /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/queue.go:147
# 0x85b9b9 github.com/davyxu/cellnet/proc.NewQueuedEventCallback.func1+0xc9 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/proc/procbundle.go:25
# 0x859305 github.com/davyxu/cellnet/peer.(*CoreProcBundle).ProcEvent+0x65 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/peer/procbundle.go:66
# 0x922fb3 github.com/davyxu/cellnet/peer/tcp.(*tcpSession).recvLoop+0x93 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/peer/tcp/session.go:151
1: 1212416 [1: 1212416] @ 0x8507c6 0x922dd1 0x85c3c6 0x934b46 0x936279 0x936246 0x85b8d7 0x850f74 0x850f00 0x85b9ba 0x859306 0x91c794 0x460391
# 0x8507c5 github.com/davyxu/cellnet.(*Pipe).Add+0xf5 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/pipe.go:17
# 0x922dd0 github.com/davyxu/cellnet/peer/tcp.(*tcpSession).Send+0x60 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/peer/tcp/session.go:91
# 0x85c3c5 GATE/src/game.(*Game).Send+0xc5 /app/src/game/game.go:56
# 0x934b45 GATE/src/server.(*ServerManager).onClientPacket+0x505 /app/src/server/servermanager.go:129
# 0x936278 GATE/src/server.(*Server).onClientPacket+0x98 /app/src/server/server.go:40
# 0x936245 GATE/src/server.(*Server).Init.func1+0x65 /app/src/server/server.go:28
# 0x85b8d6 github.com/davyxu/cellnet/proc.NewQueuedEventCallback.func1.1+0x36 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/proc/procbundle.go:27
# 0x850f73 github.com/davyxu/cellnet.QueuedCall+0x53 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/queue.go:153
# 0x850eff github.com/davyxu/cellnet.SessionQueuedCall+0x7f /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/queue.go:147
# 0x85b9b9 github.com/davyxu/cellnet/proc.NewQueuedEventCallback.func1+0xc9 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/proc/procbundle.go:25
# 0x859305 github.com/davyxu/cellnet/peer.(*CoreProcBundle).ProcEvent+0x65 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/peer/procbundle.go:66
# 0x91c793 GATE/src/mytcp.(*tcpSession).recvLoop+0x93 /app/src/mytcp/session.go:152
1: 1212416 [1: 1212416] @ 0x8509e8 0x92342a 0x460391
# 0x8509e7 github.com/davyxu/cellnet.(*Pipe).Pick+0x1a7 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/pipe.go:48
# 0x923429 github.com/davyxu/cellnet/peer/tcp.(*tcpSession).sendLoop+0x59 /go/pkg/mod/github.com/davyxu/[email protected]+incompatible/peer/tcp/session.go:165
pprof显示这里有很大内存,请大神指点一下 谢谢
from cellnet.
你放到队列里的东西大, 当然显示内存大了.
writeList[0:0]的意思就是保留元素空间, 重置指针
如果泄露, 那每一个元素都会泄露
from cellnet.
已经用过的内存不重用, 有新数据就新申请内存?. 你是有多少钱买内存啊
from cellnet.
买本go的书看下吧, issue只提bug, 不教学
from cellnet.
Related Issues (20)
- 请问怎么实现tsl支持 HOT 1
- 例子 HOT 2
- rpc怎么实现嵌套链式调用 HOT 4
- 网络层的小包读取都是readfull和new buffer gc开销会很严重
- 你好,非队列的rpc 处理能否放入独立的goroutine? HOT 2
- websocket
- websocket 链接失败
- 大佬 如何用json或者proto协议 作为数据传递 能否给个实列 HOT 1
- 请问v5版本有什么新特性么? HOT 2
- 关于 Pipe 的 Pick 和 Add 两处锁的疑问 HOT 1
- 流量支持TLS加密接口吗 HOT 1
- Pipe的优化建议:减少Pick内的数据拷贝 HOT 1
- pipe.go里面Pick函数
- 请问cellnet适合用作物联网mqtt broker吗? HOT 1
- 没有使用go自带的channel是由于什么原因? HOT 1
- 服务端无法接受4M的请求 HOT 2
- 编解码器 codec 的一个 bug HOT 2
- 在SendLTVPacket里面每次发送都创建一个同样大小的pkt HOT 7
- 有没有网关的实现列子 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cellnet.