-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_memalloc.c
25 lines (22 loc) · 1.05 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memalloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mgiraldo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/21 20:34:22 by mgiraldo #+# #+# */
/* Updated: 2020/02/26 23:03:54 by mgiraldo ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <stdlib.h>
void *ft_memalloc(size_t size)
{
void *ptr;
ptr = malloc(size);
if (ptr == NULL)
return (NULL);
ft_bzero(ptr, size);
return (ptr);
}