小编doq*_*tor的帖子

Valgrind肯定会迷失,并且可以通过退出vs主要回报获得

Valgrind报告说,如果我退出main与return 0;,肯定会丢失内存,但是如果我退出main与,则报告仍然可以访问exit(0);

test-reachable.c:

#include <stdlib.h>

int main() {
  void *data = malloc(256);
  exit(0);
}
Run Code Online (Sandbox Code Playgroud)

test-lost.c:

#include <stdlib.h>

int main() {
  void *data = malloc(256);
  return 0;
}
Run Code Online (Sandbox Code Playgroud)

行为:

$ gcc test-reachable.c -o test-reachable
$ valgrind --leak-check=yes ./test-reachable
==7696== Memcheck, a memory error detector
==7696== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==7696== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==7696== Command: ./test-reachable
==7696== 
==7696== 
==7696== HEAP SUMMARY:
==7696==     in …
Run Code Online (Sandbox Code Playgroud)

c valgrind

5
推荐指数
1
解决办法
505
查看次数

使用 HTTP/2 时是否可以有多个开放的 SSE 通道?

到目前为止我只使用 HTTP/1.1,但最近我切换到 HTTP/2。在 1.1 上,我遇到了请求数量限制问题,但 HTTP/2 使用一个连接与多路复用,这是否意味着我可以保持多个 SSE 通道打开而没有问题,还是应该只使用一个具有某些内部消息路由解决方案的通道?

http server-sent-events http2

3
推荐指数
1
解决办法
1239
查看次数

标签 统计

c ×1

http ×1

http2 ×1

server-sent-events ×1

valgrind ×1