diff options
Diffstat (limited to 'lib/pbdrv/ext/stdlib/pb-mem.c')
-rw-r--r-- | lib/pbdrv/ext/stdlib/pb-mem.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/pbdrv/ext/stdlib/pb-mem.c b/lib/pbdrv/ext/stdlib/pb-mem.c new file mode 100644 index 0000000..1f59a84 --- /dev/null +++ b/lib/pbdrv/ext/stdlib/pb-mem.c @@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <string.h> + +#include "../../pb-mem.h" +#include "../../pb-types.h" + +__weak inline void * pb_malloc(size_t sz) { + return malloc(sz); +} + +__weak inline void pb_free(void * ptr) { + free(ptr); +} + +__weak inline void * pb_realloc(void * ptr, size_t sz) { + return realloc(ptr, sz); +} + +__weak void * pb_memcpy(void * dest, const void * src, size_t sz) { + return memcpy(dest, src, sz); +} + +int pb_memcmp(const void * a, const void * b, size_t sz) { + return memcmp(a, b, sz); +} + |