]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/d/dmd/root/rmem.h
d: Merge upstream dmd 7132b3537
[thirdparty/gcc.git] / gcc / d / dmd / root / rmem.h
1
2 /* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved
3 * http://www.digitalmars.com
4 * Distributed under the Boost Software License, Version 1.0.
5 * http://www.boost.org/LICENSE_1_0.txt
6 * https://github.com/dlang/dmd/blob/master/src/dmd/root/rmem.h
7 */
8
9 #pragma once
10
11 #include "dsystem.h" // for size_t
12
13 struct Mem
14 {
15 Mem() { }
16
17 static char *xstrdup(const char *s);
18 static void *xmalloc(size_t size);
19 static void *xcalloc(size_t size, size_t n);
20 static void *xrealloc(void *p, size_t size);
21 static void xfree(void *p);
22 static void *xmallocdup(void *o, size_t size);
23 static void error();
24 };
25
26 extern Mem mem;