This commit is contained in:
2025-11-13 15:27:28 -05:00
parent e42881c4d1
commit 52c0d05889
2 changed files with 21 additions and 0 deletions

13
wrapper.c Normal file
View File

@@ -0,0 +1,13 @@
#include <stdio.h>
#include <stdlib.h>
#include "wrapper.h"
#include "usage.h"
void *xmalloc(size_t size)
{
void *ret = malloc(size);
if (!ret)
die("memory exhausted");
return ret;
}

8
wrapper.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef WRAPPER_H_
#define WRAPPER_H_
#include <stdio.h>
void *xmalloc(size_t size);
#endif