Angband
z-virt.h
Go to the documentation of this file.
1 
12 #ifndef INCLUDED_Z_VIRT_H
13 #define INCLUDED_Z_VIRT_H
14 
15 #include "h-basic.h"
16 
17 
21 void *mem_alloc(size_t len);
22 void *mem_zalloc(size_t len);
23 void mem_free(void *p);
24 void *mem_realloc(void *p, size_t len);
25 
26 char *string_make(const char *str);
27 void string_free(char *str);
28 char *string_append(char *s1, const char *s2);
29 
30 enum {
31  MEM_POISON_ALLOC = 0x00000001,
32  MEM_POISON_FREE = 0x00000002
33 };
34 
35 extern unsigned int mem_flags;
36 
37 #endif /* INCLUDED_Z_VIRT_H */
char * string_make(const char *str)
Duplicates an existing string str, allocating as much memory as necessary.
Definition: z-virt.c:88
png_voidp s1
Definition: libpng12/png.h:2142
void * mem_alloc(size_t len)
Replacements for malloc() and friends that die on failure.
Definition: z-virt.c:34
The lowest level header.
png_voidp png_voidp s2
Definition: libpng12/png.h:2142
Definition: z-virt.h:31
const char ** p[]
Definition: name.c:40
void * mem_realloc(void *p, size_t len)
Definition: z-virt.c:68
void mem_free(void *p)
Definition: z-virt.c:59
Definition: z-virt.h:32
char * string_append(char *s1, const char *s2)
Definition: z-virt.c:111
void string_free(char *str)
Definition: z-virt.c:106
void * mem_zalloc(size_t len)
Definition: z-virt.c:52
unsigned int mem_flags
Definition: z-virt.c:21