| 
    MySQL 5.6.14 Source Code Document
    
   | 
 
#include "mem0mem.h"#include "buf0buf.h"#include "srv0srv.h"#include "mem0dbg.cc"#include <stdarg.h>
Go to the source code of this file.
Functions | |
| UNIV_INTERN char * | mem_heap_strdup (mem_heap_t *heap, const char *str) | 
| UNIV_INTERN void * | mem_heap_dup (mem_heap_t *heap, const void *data, ulint len) | 
| UNIV_INTERN char * | mem_heap_strcat (mem_heap_t *heap, const char *s1, const char *s2) | 
| UNIV_INTERN char * | mem_heap_printf (mem_heap_t *heap, const char *format,...) | 
| UNIV_INTERN mem_block_t * | mem_heap_create_block (mem_heap_t *heap, ulint n, ulint type, const char *file_name, ulint line) | 
| UNIV_INTERN mem_block_t * | mem_heap_add_block (mem_heap_t *heap, ulint n) | 
| UNIV_INTERN void | mem_heap_block_free (mem_heap_t *heap, mem_block_t *block) | 
| UNIV_INTERN void | mem_heap_free_block_free (mem_heap_t *heap) | 
| UNIV_INTERN mem_block_t* mem_heap_add_block | ( | mem_heap_t * | heap, | 
| ulint | n | ||
| ) | 
Adds a new block to a memory heap.
| heap | in: memory heap | 
| n | in: number of bytes user needs | 
Definition at line 416 of file mem0mem.cc.

| UNIV_INTERN void mem_heap_block_free | ( | mem_heap_t * | heap, | 
| mem_block_t * | block | ||
| ) | 
Frees a block from a memory heap.
| heap | in: heap | 
| block | in: block to free | 
Definition at line 469 of file mem0mem.cc.

| UNIV_INTERN mem_block_t* mem_heap_create_block | ( | mem_heap_t * | heap, | 
| ulint | n, | ||
| ulint | type, | ||
| const char * | file_name, | ||
| ulint | line | ||
| ) | 
Creates a memory heap block where data can be allocated.
| heap | in: memory heap or NULL if first block should be created | 
| n | in: number of bytes needed for user data | 
| type | in: type of heap: MEM_HEAP_DYNAMIC or MEM_HEAP_BUFFER | 
| file_name | in: file name where created | 
| line | in: line where created | 
Definition at line 302 of file mem0mem.cc.


| UNIV_INTERN void* mem_heap_dup | ( | mem_heap_t * | heap, | 
| const void * | data, | ||
| ulint | len | ||
| ) | 
Duplicate a block of data, allocated from a memory heap.
| heap | in: memory heap where copy is allocated | 
| data | in: data to be copied | 
| len | in: length of data, in bytes | 
Definition at line 119 of file mem0mem.cc.


| UNIV_INTERN void mem_heap_free_block_free | ( | mem_heap_t * | heap | ) | 
Frees the free_block field from a memory heap.
| heap | in: heap | 
Definition at line 542 of file mem0mem.cc.

| UNIV_INTERN char* mem_heap_printf | ( | mem_heap_t * | heap, | 
| const char * | format, | ||
| ... | |||
| ) | 
A simple sprintf replacement that dynamically allocates the space for the formatted string from the given heap. This supports a very limited set of the printf syntax: types 's' and 'u' and length modifier 'l' (which is required for the 'u' type).
| heap | in: memory heap | 
| format | in: format string | 
Definition at line 271 of file mem0mem.cc.

| UNIV_INTERN char* mem_heap_strcat | ( | mem_heap_t * | heap, | 
| const char * | s1, | ||
| const char * | s2 | ||
| ) | 
Concatenate two strings and return the result, using a memory heap.
| heap | in: memory heap where string is allocated | 
| s1 | in: string 1 | 
| s2 | in: string 2 | 
Definition at line 133 of file mem0mem.cc.

| UNIV_INTERN char* mem_heap_strdup | ( | mem_heap_t * | heap, | 
| const char * | str | ||
| ) | 
Duplicates a NUL-terminated string, allocated from a memory heap.
| heap | in: memory heap where string is allocated | 
| str | in: string to be copied | 
Definition at line 106 of file mem0mem.cc.

