-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_free_memarena_exit.c
More file actions
26 lines (24 loc) · 1.21 KB
/
ft_free_memarena_exit.c
File metadata and controls
26 lines (24 loc) · 1.21 KB
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_free_memarena_exit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jvarila <jvarila@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/21 12:16:33 by jvarila #+# #+# */
/* Updated: 2025/03/21 12:19:44 by jvarila ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* Prints error message and frees linked list of memory arenas.
*
* @param arena Pointer to primary memarena node
* @param msg Error message to print before exit
*/
void ft_free_memarena_exit(t_memarena *arena, const char *msg)
{
ft_putendl_fd(msg, STDERR_FILENO);
ft_free_memarena(arena);
exit(ERROR_ALLOC);
}