Skip to content

Commit 99c1740

Browse files
author
michalbiesek
committed
Expose zmalloc_pmem
1 parent 79ab50c commit 99c1740

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/zmalloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static void zfree_pmem(void *ptr) {
103103
zmalloc_pmem_not_available();
104104
}
105105

106-
static void *zmalloc_pmem(size_t size) {
106+
void *zmalloc_pmem(size_t size) {
107107
(void)(size);
108108
zmalloc_pmem_not_available();
109109
return NULL;
@@ -218,7 +218,7 @@ static void zfree_pmem(void *ptr) {
218218
#endif
219219
}
220220

221-
static void *zmalloc_pmem(size_t size) {
221+
void *zmalloc_pmem(size_t size) {
222222
void *ptr = memkind_malloc(MEMKIND_DAX_KMEM, size+PREFIX_SIZE);
223223
if (!ptr && errno==ENOMEM) zmalloc_oom_handler(size);
224224
#ifdef HAVE_MALLOC_SIZE

src/zmalloc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ size_t zmalloc_get_threshold(void);
108108
void *zmalloc_dram(size_t size);
109109
void *zcalloc_dram(size_t size);
110110
void *zrealloc_dram(void *ptr, size_t size);
111+
void *zmalloc_pmem(size_t size);
111112
void *zmemcpy_pmem(void *dst, const void *src, size_t num);
112113
void *zmemset_pmem(void *ptr, int value, size_t num);
113114

0 commit comments

Comments
 (0)