aboutsummaryrefslogtreecommitdiff
path: root/pu3
diff options
context:
space:
mode:
authorGravatar Moon Flower <moon@coffin.ir> 2025-08-27 19:16:34 +0330
committerGravatar Moon Flower <moon@coffin.ir> 2025-08-27 19:16:34 +0330
commit9e09cc64cbe18e1cbb03b9fa6a2e4cbca10c01db (patch)
treea34149c140bff08223337e771af32fac8999c02e /pu3
parentpu3 poc2 (diff)
pu3 poc3
Diffstat (limited to 'pu3')
-rwxr-xr-xpu3/pu3bin0 -> 16272 bytes
-rw-r--r--pu3/pu3.cpu.c4
2 files changed, 4 insertions, 0 deletions
diff --git a/pu3/pu3 b/pu3/pu3
new file mode 100755
index 0000000..6e691fc
--- /dev/null
+++ b/pu3/pu3
Binary files differ
diff --git a/pu3/pu3.cpu.c b/pu3/pu3.cpu.c
index fe9838d..0597027 100644
--- a/pu3/pu3.cpu.c
+++ b/pu3/pu3.cpu.c
@@ -268,6 +268,10 @@ int main() {
const uint32_t SIZE = 1 << 24;
let mem_arr = calloc(SIZE, sizeof(pu3_inst_t));
+ if (!mem_arr) {
+ perror("memory allocation failed");
+ return 1;
+ }
pu3_ctx ctx = { .memory = { .memory_u64 = mem_arr, .memory_u32 = mem_arr },
.mem_size = SIZE,