In the process-based server in Figure 12.5, we observed that there is no memory leak and the

Question:

In the process-based server in Figure 12.5, we observed that there is no memory leak and the code remains correct even when line 33 is deleted. In the threads based server in Figure 12.14, are there any chances of memory leak if lines 31 or 32 are deleted. Why?

Figure 12.5

1 #include "csapp.h" 2 void echo(int connfd); 3 4 5 6 7 8 9 10 11 234 13 12 { 14 15 16 17 18 19 void

Figure 12.14

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 #include

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Systems A Programmers Perspective

ISBN: 9781292101767

3rd Global Edition

Authors: Randal E. Bryant, David R. O'Hallaron

Question Posted: