From 4b094722234cc7d65f57763bdc83149135e6755e Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Wed, 25 Sep 2024 20:45:37 -0400 Subject: reduce buffer size --- balls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'balls.c') diff --git a/balls.c b/balls.c index 1fcb5df..7ceedee 100644 --- a/balls.c +++ b/balls.c @@ -26,9 +26,9 @@ enum { FPS = 60, NS_PER_SEC = 1000000000, FRAME_TIME = NS_PER_SEC / FPS, - TICK_BUFSIZE = 4, + TICK_BUFSIZE = 1, - POS_BUFSIZE = 4, + BALL_BUFSIZE = 1, }; typedef struct { @@ -156,7 +156,7 @@ spawnballs(int n) { for (j = 0; j < n; j++) { if (j == i) continue; - if ((cs[i][j] = chancreate(sizeof(Ball), POS_BUFSIZE)) == nil) + if ((cs[i][j] = chancreate(sizeof(Ball), BALL_BUFSIZE)) == nil) sysfatal("failed to create channel"); } } -- cgit v1.2.3