26 lines
1.2 KiB
C
26 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* program_end.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/12/10 17:11:27 by tomoron #+# #+# */
|
|
/* Updated: 2024/12/10 18:13:37 by tomoron ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "includes/malloc.h"
|
|
#include <stdio.h>
|
|
|
|
void __attribute__((destructor)) malloc_end(void)
|
|
{
|
|
if (get_settings()->show_leaks)
|
|
{
|
|
ft_putstr_fd("\n\033[31m\033[1mMALLOC_SHOW_LEAKS is defined, here is \
|
|
the leak report\n", 1);
|
|
show_alloc_mem();
|
|
ft_putstr_fd("\033[0m", 1);
|
|
}
|
|
}
|