-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memalloc.c
26 lines (23 loc) · 1.07 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memalloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmalie <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/04 15:34:27 by mmalie #+# #+# */
/* Updated: 2024/11/14 09:30:42 by mmalie ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memalloc(size_t size)
{
void *fresh_mem;
fresh_mem = malloc(size);
if (fresh_mem == NULL)
{
return (NULL);
}
ft_memset(fresh_mem, 0, size);
return (fresh_mem);
}