fix norm
This commit is contained in:
25
srcs/program_end.c
Normal file
25
srcs/program_end.c
Normal file
@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user