-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathft_memalloc.c
27 lines (24 loc) · 1.08 KB
/
ft_memalloc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memalloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ggane <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/04/18 11:17:00 by ggane #+# #+# */
/* Updated: 2016/12/18 00:01:49 by ggane ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memalloc(size_t size)
{
void *zone_memoire;
zone_memoire = malloc(size);
if (zone_memoire)
{
ft_bzero(zone_memoire, size);
return (zone_memoire);
}
else
return (NULL);
}