21#ifndef DEBIAN_INSTALLER__MEM_H
22#define DEBIAN_INSTALLER__MEM_H
24#include <debian-installer/types.h>
41void *
di_malloc (
size_t n_bytes) __attribute__ ((malloc));
50void *
di_malloc0 (
size_t n_bytes) __attribute__ ((malloc));
60void *
di_realloc (
void *mem,
size_t n_bytes) __attribute__ ((malloc));
73#define di_new(struct_type, n_structs) \
74 ((struct_type *) di_malloc (sizeof (struct_type) * (n_structs)))
79#define di_new0(struct_type, n_structs) \
80 ((struct_type *) di_malloc0 (sizeof (struct_type) * (n_structs)))
86#define di_renew(struct_type, mem, n_structs) \
87 ((struct_type *) di_realloc ((mem), sizeof (struct_type) * (n_structs)))
void di_free(void *mem)
Definition: mem.c:60
void * di_malloc0(size_t n_bytes) __attribute__((malloc))
Definition: mem.c:40
void * di_malloc(size_t n_bytes) __attribute__((malloc))
Definition: mem.c:29
void * di_realloc(void *mem, size_t n_bytes) __attribute__((malloc))
Definition: mem.c:51