diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/netrate/http/http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/tools/netrate/http/http.c b/tools/tools/netrate/http/http.c index c712d95..5010703 100644 --- a/tools/tools/netrate/http/http.c +++ b/tools/tools/netrate/http/http.c @@ -273,6 +273,10 @@ main(int argc, char *argv[]) if (argc != 3) usage(); + if (numthreads > MAXTHREADS) + errx(-1, "%d exceeds max threads %d", numthreads, + MAXTHREADS); + len = roundup(sizeof(struct state), getpagesize()); pagebuffer = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); if (pagebuffer == MAP_FAILED) |