mdbx: add mdbx_malloc/mdbx_free, etc.

1 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43

Change-Id: Ia5204be9f943fefde42e6a46e652c1be6ab6a96b
This commit is contained in:
Leonid Yuriev
2018-10-12 22:01:36 +03:00
parent 777d1db5c9
commit ace3d1bfa3
9 changed files with 97 additions and 89 deletions

View File

@@ -356,13 +356,13 @@ int main(int argc, char *argv[]) {
MDBX_dbi db2;
if (memchr(key.iov_base, '\0', key.iov_len))
continue;
str = malloc(key.iov_len + 1);
str = mdbx_malloc(key.iov_len + 1);
memcpy(str, key.iov_base, key.iov_len);
str[key.iov_len] = '\0';
rc = mdbx_dbi_open(txn, str, 0, &db2);
if (rc == MDBX_SUCCESS)
printf("Status of %s\n", str);
free(str);
mdbx_free(str);
if (rc)
continue;
rc = mdbx_dbi_stat(txn, db2, &mst, sizeof(mst));