aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c/urweb.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 13:06:51 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 13:06:51 -0400
commit05fbd01cabc967d7216d8cbe701ac10ad797b122 (patch)
tree73966b5bbe40adcbb3abbf589652ef3b8afc0440 /src/c/urweb.c
parentfe9025e471578cbdef8ee21e0f9dc51f0f2107ce (diff)
More opportunities to use regions and lack of string copying
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r--src/c/urweb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 7c7b057f..d4fd1844 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -207,6 +207,11 @@ void uw_end_region(uw_context ctx) {
ctx->regions = r->next;
}
+void uw_memstats(uw_context ctx) {
+ printf("Page: %d/%d\n", ctx->page_front - ctx->page, ctx->page_back - ctx->page);
+ printf("Heap: %d/%d\n", ctx->heap_front - ctx->heap, ctx->heap_back - ctx->heap);
+}
+
int uw_really_send(int sock, const void *buf, ssize_t len) {
while (len > 0) {
ssize_t n = send(sock, buf, len, 0);