void my_large_free(uchar* ptr)
{
    DBUG_ENTER("my_large_free");

    /*
      my_large_free_int() can only fail if ptr was not allocated with
      my_large_malloc_int(), i.e. my_malloc() was used so we should free it
      with my_free()
    */
    if (!my_use_large_pages || !my_large_page_size || !my_large_free_int(ptr))
        my_free(ptr);

    DBUG_VOID_RETURN;
}
Exemple #2
0
void my_large_free(uchar* ptr, myf my_flags __attribute__((unused)))
{
  DBUG_ENTER("my_large_free");
  
  /*
    my_large_free_int() can only fail if ptr was not allocated with
    my_large_malloc_int(), i.e. my_malloc_lock() was used so we should free it
    with my_free_lock()
  */
  if (!my_use_large_pages || !my_large_page_size ||
      !my_large_free_int(ptr, my_flags))
    my_free_lock(ptr, my_flags);

  DBUG_VOID_RETURN;
}