bpaul-chess

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 9b65fb6f2496f124db4ae84d1a2a0f0c421d0bf7
parent 295a8cb88f5fde3efa919fba89707107cbecab1c
Author: benjamin paul <bpaul@bpaul.xyz>
Date:   Fri,  6 Aug 2021 20:35:10 +1000

Long text about buffer size

Diffstat:
Msrc/main.c | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -1,4 +1,19 @@ +#include <stdio.h> + int main() { + /* If your computer does not have enough RAM to support a 2KiB buffer, it + * probably wont be able to run the program. + * + * A 2048 character buffer may be too small for a position command, a + * setoption command or a go searchmoves command. The position command is + * the only command out of these which may actually be used of such size. + * For it to be the case that the command is too big, there must be + * (2048-17)/5 moves being the buffer size minus the length of "position + * startpos" divided by the size of a move, being 4 characters and a space. + * This means that with this buffer size, a game cannot go on for longer + * than 406 moves. */ + char buf[2048]; + return 0; }