ASSERT(!RelocInfo::RequiresRelocation(desc));
CPU::FlushICache(buffer, actual_size);
OS::ProtectCode(buffer, actual_size);
+ // TODO(jkummerow): It would be nice to register this code creation event
+ // with the PROFILE / GDBJIT system.
return FUNCTION_CAST<OS::MemMoveFunction>(buffer);
}
// Copy memory area. No restrictions.
void OS::MemMove(void* dest, const void* src, size_t size) {
+ if (size == 0) return;
// Note: here we rely on dependent reads being ordered. This is true
// on all architectures we currently support.
(*memmove_function)(dest, src, size);
// Copy memory area to disjoint memory area.
void OS::MemMove(void* dest, const void* src, size_t size) {
+ if (size == 0) return;
// Note: here we rely on dependent reads being ordered. This is true
// on all architectures we currently support.
(*memmove_function)(dest, src, size);