Parcourir la source

Use __malloc_unlikely instead of `likely'.

Miles Bader il y a 22 ans
Parent
commit
6e58f3b7d4
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      libc/stdlib/malloc/free.c

+ 4 - 1
libc/stdlib/malloc/free.c

@@ -26,9 +26,12 @@ free (void *mem)
   struct heap_free_area *fa;
   struct heap *heap = &__malloc_heap;
 
-  if (unlikely (! mem))
+  /* Check for special cases.  */
+  if (__malloc_unlikely (! mem))
     return;
 
+  /* Normal free.  */
+
   size = MALLOC_SIZE (mem);
   mem = MALLOC_BASE (mem);