File: mem.h

package info (click to toggle)
nvme-cli 2.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,664 kB
  • sloc: ansic: 80,727; sh: 2,257; python: 975; makefile: 70; ruby: 25
file content (20 lines) | stat: -rw-r--r-- 442 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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_ */