-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memalloc.c
executable file
·27 lines (23 loc) · 1.09 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: mwilliam <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/12 18:36:08 by mwilliam #+# #+# */
/* Updated: 2016/12/02 21:00:57 by mwilliam ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** Allocates with malloc and returns a "fresh" memory area
*/
void *ft_memalloc(size_t size)
{
void *fresh;
if (!(fresh = malloc(size)))
return (NULL);
ft_bzero(fresh, size);
return (fresh);
}