summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-07-07 14:30:21 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-07-07 14:30:21 +0530
commit965bf81879b22a25fd9b0d17ce6defd3d51c6173 (patch)
treeeeadd04afb52e950a3345c7fa4bc51d94446a658 /src/ipc.c
parent3c540db464f4034d0a393b076c79a26851f68f47 (diff)
engine can now send updates to uci
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 9c4dfcc..99332ae 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -3,21 +3,9 @@
#include "ipc.h"
-// https://stackoverflow.com/a/5656561
-void* create_shared_memory(size_t size) {
- int protection = PROT_READ | PROT_WRITE;
- int visibility = MAP_SHARED | MAP_ANONYMOUS;
- return mmap(
- NULL,
- size,
- protection, visibility,
- -1, 0
- );
-}
-
comm_moves comm_moves_init() {
return (comm_moves) {
- create_shared_memory(sizeof(struct uci_move) * 50),
+ malloc(sizeof(struct uci_move) * 50),
0,
50
};