Przeglądaj źródła

Removed debugging printf's.

Ioannis Koutras 14 lat temu
rodzic
commit
7b75a1920f
2 zmienionych plików z 0 dodań i 9 usunięć
  1. 0 3
      custom_free.c
  2. 0 6
      larson.c

+ 0 - 3
custom_free.c

@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include "custom_free.h"
 #include "custom_free.h"
 #include "other.h"
 #include "other.h"
 #include "posix_lock.h"
 #include "posix_lock.h"
@@ -26,11 +25,9 @@ void custom_free(heap_t* heap, void *ptr) {
 			set_next(ptr, current_maptable_node->fixed_list_head);
 			set_next(ptr, current_maptable_node->fixed_list_head);
 			current_maptable_node->fixed_list_head = ptr;
 			current_maptable_node->fixed_list_head = ptr;
 		}
 		}
-		printf("Block of size %d was free'd to a fixed list.\n", size);
 	} else { // put it in the free list
 	} else { // put it in the free list
 		set_next(ptr, heap->free_list_head);
 		set_next(ptr, heap->free_list_head);
 		heap->free_list_head = ptr;
 		heap->free_list_head = ptr;
-		printf("Block of size %d was free'd to free list.\n", size);
 	}
 	}
 
 
 	posix_unlock(heap);
 	posix_unlock(heap);

+ 0 - 6
larson.c

@@ -98,8 +98,6 @@ static void warmup(char **blkp, int num_chunks) {
 		assert(blkp[cblks] != NULL);
 		assert(blkp[cblks] != NULL);
 	}
 	}
 
 
-	printf("trololo1\n");
-
 	/* generate a random permutation of the chunks */
 	/* generate a random permutation of the chunks */
 	for(cblks = num_chunks; cblks > 0 ; cblks--) {
 	for(cblks = num_chunks; cblks > 0 ; cblks--) {
 		victim = lran2(&rgen) % cblks;
 		victim = lran2(&rgen) % cblks;
@@ -112,14 +110,10 @@ static void warmup(char **blkp, int num_chunks) {
 		victim = lran2(&rgen) % num_chunks;
 		victim = lran2(&rgen) % num_chunks;
 		custom_free(myheap, blkp[victim]);
 		custom_free(myheap, blkp[victim]);
 
 
-		printf("trololo2\n");
-
 		blk_size = min_size + lran2(&rgen) % (max_size - min_size);
 		blk_size = min_size + lran2(&rgen) % (max_size - min_size);
 		blkp[victim] = (char *) custom_malloc(myheap, (size_t) blk_size);
 		blkp[victim] = (char *) custom_malloc(myheap, (size_t) blk_size);
 		blksize[victim] = blk_size;
 		blksize[victim] = blk_size;
 		assert(blkp[victim] != NULL);
 		assert(blkp[victim] != NULL);
-
-		printf("trololo3\n");
 	}
 	}
 }
 }