Sfoglia il codice sorgente

Perform req_padding() before searching for a fixed list.

Ioannis Koutras 13 anni fa
parent
commit
d4e695665a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      custom_malloc.c

+ 1 - 1
custom_malloc.c

@@ -20,7 +20,7 @@ void * custom_malloc(heap_t* heap, size_t size) {
     posix_lock(heap);
 #endif /* HAVE_LOCKS */
 
-    fixed_list_id = map_size_to_list(heap, size);
+    fixed_list_id = map_size_to_list(heap, req_padding(size));
 
     // If a fixed list is found, do a first fit
     if(fixed_list_id != -1) {