+2012-02-01 Eli Zaretskii <eliz@gnu.org>
+
+ * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
+ first 2 arguments are identical. This makes inserting large
+ output from a subprocess an order of magnitude faster on
+ MS-Windows, where all sbrk'ed memory is always contiguous.
+
2012-01-31 Glenn Morris <rgm@gnu.org>
* nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
}
else
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
}
}
else
{
- memmove (bloc->new_data, bloc->data, old_size);
+ if (bloc->new_data != bloc->data)
+ memmove (bloc->new_data, bloc->data, old_size);
memset ((char *) bloc->new_data + old_size, 0, size - old_size);
*bloc->variable = bloc->data = bloc->new_data;
}
}
else
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
}
header. */
for (b = last_bloc; b != NIL_BLOC; b = b->prev)
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
for (b = first_bloc; b != NIL_BLOC; b = b->next)
{
- memmove (b->new_data, b->data, b->size);
+ if (b->new_data != b->data)
+ memmove (b->new_data, b->data, b->size);
*b->variable = b->data = b->new_data;
}
}