diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-09-25 20:45:37 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-09-25 20:45:37 -0400 |
| commit | 4b094722234cc7d65f57763bdc83149135e6755e (patch) | |
| tree | 7fadf3dd7e1e0bd579c9675be17f96d99e25e635 | |
| parent | 0b62e7d4bd1cd5676c448c0878186958edd7a879 (diff) | |
| download | balls-4b094722234cc7d65f57763bdc83149135e6755e.zip | |
reduce buffer size
| -rw-r--r-- | balls.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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"); } } |