diff src/c/driver.c @ 136:133fa2d51bb4

Dynamic arena allocation
author Adam Chlipala <adamc@hcoop.net>
date Thu, 17 Jul 2008 14:18:57 -0400
parents 94856a3b4752
children d6d78055f001
line wrap: on
line diff
--- a/src/c/driver.c	Thu Jul 17 13:33:56 2008 -0400
+++ b/src/c/driver.c	Thu Jul 17 14:18:57 2008 -0400
@@ -72,7 +72,7 @@
 
       printf("Serving URI %s....\n", path);
 
-      ctx = lw_init(1024);
+      ctx = lw_init(1024, 1024);
       lw_write (ctx, "HTTP/1.1 200 OK\r\n");
       lw_write(ctx, "Content-type: text/html\r\n\r\n");
       lw_write(ctx, "<html>");
@@ -81,6 +81,7 @@
 
       lw_send(ctx, sock);
 
+      lw_free(ctx);
       printf("Done with client.\n\n");
       close(sock);
       return;