|
|
|
@ -125,27 +125,6 @@ mem_heap_dup( |
|
|
|
return(memcpy(mem_heap_alloc(heap, len), data, len)); |
|
|
|
} |
|
|
|
|
|
|
|
/**********************************************************************//** |
|
|
|
Concatenate two memory blocks and return the result, using a memory heap. |
|
|
|
@return own: the result */ |
|
|
|
UNIV_INTERN |
|
|
|
void* |
|
|
|
mem_heap_cat( |
|
|
|
/*=========*/ |
|
|
|
mem_heap_t* heap, /*!< in: memory heap where result is allocated */ |
|
|
|
const void* b1, /*!< in: block 1 */ |
|
|
|
ulint len1, /*!< in: length of b1, in bytes */ |
|
|
|
const void* b2, /*!< in: block 2 */ |
|
|
|
ulint len2) /*!< in: length of b2, in bytes */ |
|
|
|
{ |
|
|
|
void* res = mem_heap_alloc(heap, len1 + len2); |
|
|
|
|
|
|
|
memcpy(res, b1, len1); |
|
|
|
memcpy((char*)res + len1, b2, len2); |
|
|
|
|
|
|
|
return(res); |
|
|
|
} |
|
|
|
|
|
|
|
/**********************************************************************//** |
|
|
|
Concatenate two strings and return the result, using a memory heap. |
|
|
|
@return own: the result */ |
|
|
|
|