Copy a memory block.
- Parameters
-
[in,out] | dst | the destination base address |
[in] | src | the source base address |
[in] | sz | the block size |
- Returns
- the first argument
- Note
- This method is used for portability (in place of BSD's bcopy)
Definition at line 347 of file util.cpp.
References __D_ASSERT, likely, and unlikely.
351 if (
unlikely(dst == NULL || src == NULL) )
354 u8 *d =
static_cast<u8*
> (dst);
355 const u8 *s =
static_cast<const u8*
> (src);
356 while (
likely(sz-- > 0) )
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
unsigned char u8
8-bit unsigned integer
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
#define __D_ASSERT(x)
Assertion macro.