1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-13 20:03:16 +03:00

branches/zip: Define mem_heap_calloc() and mem_calloc(). Use them

when allocating zero-filled memory.
This commit is contained in:
marko
2007-06-19 09:39:27 +00:00
parent b3b01c1cee
commit f24fa9e6b0
9 changed files with 45 additions and 22 deletions

View File

@@ -727,8 +727,9 @@ skip_field:
/* Set the extern field reference in dfield to zero */
dfield->len = BTR_EXTERN_FIELD_REF_SIZE;
dfield->data = mem_heap_alloc(heap, BTR_EXTERN_FIELD_REF_SIZE);
memset(dfield->data, 0, BTR_EXTERN_FIELD_REF_SIZE);
dfield->data = mem_heap_calloc(heap,
BTR_EXTERN_FIELD_REF_SIZE);
UNIV_MEM_ALLOC(dfield->data, BTR_EXTERN_FIELD_REF_SIZE);
n_fields++;
ut_ad(n_fields < dtuple_get_n_fields(entry));
}