diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-11 13:06:51 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-11 13:06:51 -0400 |
commit | 05fbd01cabc967d7216d8cbe701ac10ad797b122 (patch) | |
tree | 73966b5bbe40adcbb3abbf589652ef3b8afc0440 /src/c/urweb.c | |
parent | fe9025e471578cbdef8ee21e0f9dc51f0f2107ce (diff) |
More opportunities to use regions and lack of string copying
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r-- | src/c/urweb.c | 5 |
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); |