From 7b41bd65950df042fd8826708714851cbf6f84a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 2 Apr 2007 13:03:33 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20ensemble=20de=20fonctions=20permettant?= =?UTF-8?q?=20la=20gestion=20de=20la=20m=C3=A9moire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/memory.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lib/memory.c diff --git a/lib/memory.c b/lib/memory.c new file mode 100644 index 0000000..9092ec4 --- /dev/null +++ b/lib/memory.c @@ -0,0 +1,38 @@ +#include "types.h" + +void memset(void *dest, u8 val, u16 count, u32 size) +{ + char *temp; + for(temp = (u8 *)dest; count != 0; count--) +{ +*temp = val; +temp+=size; +} +} + +void memcpy(void *dest, const void *src, u32 size) +{ + u8 *s, *d; + u32 i; + s = (u8 *) src; + d = (u8 *) dest; + for(i=0;i