File: xalloc.h

package info (click to toggle)
evilwm 1.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 516 kB
  • sloc: ansic: 3,893; perl: 551; sh: 100; makefile: 99
file content (24 lines) | stat: -rw-r--r-- 462 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
21
22
23
24
/*

Memory allocation with checking

Copyright 2014-2018 Ciaran Anscomb

A small set of convenience functions that wrap standard system calls and
provide out of memory checking.  See Gnulib for a far more complete set.

*/

#ifndef EVILWM_XALLOC_H_
#define EVILWM_XALLOC_H_

#include <stddef.h>

void *xmalloc(size_t s);
void *xzalloc(size_t s);
void *xrealloc(void *p, size_t s);

void *xmemdup(const void *p, size_t s);
char *xstrdup(const char *str);

#endif