Skip to content

Commit

Permalink
mute print
Browse files Browse the repository at this point in the history
  • Loading branch information
Ycaro02 committed Apr 3, 2024
1 parent 0e74b94 commit 9b60a8c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/show_alloc_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ static size_t print_bloc(t_page *data, int16_t hex_flag)
} else {
ft_printf_fd(1, "%p - %p", ptr, ptr + block->size);
ft_printf_fd(1, ": %U bytes\n", ptr + block->size - ptr);
ft_printf_fd(1, "block metadata size-> %u next-> %p\n", block->size, block->next);
ft_printf_fd(1, "block data-> |%s|\n", (char *)ptr);
// ft_printf_fd(1, "block metadata size-> %u next-> %p\n", block->size, block->next);
// ft_printf_fd(1, "block data-> |%s|\n", (char *)ptr);
}
total += ptr + block->size - ptr;
block = block->next;
Expand Down
42 changes: 21 additions & 21 deletions tester/src/test_implementation.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,34 +146,34 @@ int test4(char *version)
}


static void fill_full_tiny_page()
{
char *addr;
int i = 0;

int j = 0;

while (i < 100)
{
addr = (char*)malloc(128);
for (int j = 0; j < 128; j++) {
addr[j] = 'A';
}
addr[127] = '\0';
i++;
}
# ifdef USE_LIBFT_MALLOC /* define at compilation time */
show_alloc_mem();
#endif
}
// static void fill_full_tiny_page()
// {
// char *addr;
// int i = 0;

// int j = 0;

// while (i < 100)
// {
// addr = (char*)malloc(128);
// for (int j = 0; j < 128; j++) {
// addr[j] = 'A';
// }
// addr[127] = '\0';
// i++;
// }
// # ifdef USE_LIBFT_MALLOC /* define at compilation time */
// show_alloc_mem();
// #endif
// }

int main(int argc, char **argv)
{
int test_flag = 0;
if (argc == 2) {
test_flag = atoi(argv[1]);
}
fill_full_tiny_page();
// fill_full_tiny_page();

if (test_flag & TEST0)
test0(TEST_VERSION_NAME);
Expand Down

0 comments on commit 9b60a8c

Please sign in to comment.