tests/ dir

This commit is contained in:
Jack Halford 2017-02-20 17:11:59 +01:00
parent c395e96cd5
commit 0cacbbeb72
8 changed files with 9 additions and 37 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/17 23:00:06 by jhalford #+# #+# */
/* Updated: 2017/02/18 18:53:22 by jhalford ### ########.fr */
/* Updated: 2017/02/20 17:03:33 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/17 23:00:24 by jhalford #+# #+# */
/* Updated: 2017/02/18 20:06:55 by jhalford ### ########.fr */
/* Updated: 2017/02/20 17:03:44 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

Binary file not shown.

View file

@ -1,20 +0,0 @@
#include <stdlib.h>
#include "includes/malloc.h"
int main(void)
{
void *ptr0 = malloc(4096);
show_alloc_mem();
void *ptr1 = malloc(16);
show_alloc_mem();
free(ptr0);
show_alloc_mem();
void *ptr2 = malloc(16);
show_alloc_mem();
void *ptr3 = malloc(32);
show_alloc_mem();
}

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/17 12:28:03 by jhalford #+# #+# */
/* Updated: 2017/02/18 20:10:24 by jhalford ### ########.fr */
/* Updated: 2017/02/20 16:56:23 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/17 12:28:02 by jhalford #+# #+# */
/* Updated: 2017/02/18 20:08:49 by jhalford ### ########.fr */
/* Updated: 2017/02/20 17:11:20 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -55,7 +55,11 @@ void *malloc(size_t size)
ft_putstr("found @");
print_node(FG_GREEN, *node_ref);
node = split_node(node_ref, alloc_ref, zone_ref, size);
ft_putstr("touser@");
print_node(FG_RED, node);
ft_putstr(FG_YELLOW"passing ");
ft_putnbr_hex((long)node->data);
ft_putendl(" to user"FG_DEFAULT);
return (node->data);
}

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/17 12:28:20 by jhalford #+# #+# */
/* Updated: 2017/02/18 19:58:20 by jhalford ### ########.fr */
/* Updated: 2017/02/20 17:11:29 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -1,12 +0,0 @@
#include "includes/malloc.h"
int main(void)
{
int i;
char *addr;
i = 0;
while (i < 1024)
i++;
return (0);
}