diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:57:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:57:54 +0000 |
commit | 66e4b69042cd3b44acd42f1fad2109180c1bc48b (patch) | |
tree | 8bd8e664ae856167566375357963062e8112f181 /util/mem.h | |
parent | Releasing debian version 2.5-1. (diff) | |
download | nvme-cli-66e4b69042cd3b44acd42f1fad2109180c1bc48b.tar.xz nvme-cli-66e4b69042cd3b44acd42f1fad2109180c1bc48b.zip |
Merging upstream version 2.7.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | util/mem.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/util/mem.h b/util/mem.h new file mode 100644 index 0000000..d13eb3a --- /dev/null +++ b/util/mem.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef MEM_H_ +#define MEM_H_ + +#include <stddef.h> +#include <stdbool.h> + +void *nvme_alloc(size_t len); +void *nvme_realloc(void *p, size_t len); + +struct nvme_mem_huge { + size_t len; + bool posix_memalign; /* p has been allocated using posix_memalign */ + void *p; +}; + +void *nvme_alloc_huge(size_t len, struct nvme_mem_huge *mh); +void nvme_free_huge(struct nvme_mem_huge *mh); + +#endif /* MEM_H_ */ |