Debian Codegraph @

src/lzma/Alloc.h

raw
1 /* Alloc.h -- Memory allocation functions
2 2008-03-13
3 Igor Pavlov
4 Public domain */
5 // ----------------------------------------------------------------------------
6 // Copyright (C) 2014
7 // David Freese, W1HKJ
8 //
9 // This file is part of flmsg
10 //
11 // flrig is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation; either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // flrig is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 // ----------------------------------------------------------------------------
24
25 #ifndef __COMMON_ALLOC_H
26 #define __COMMON_ALLOC_H
27
28 #include <stddef.h>
29
30 void *MyAlloc(size_t size);
31 void MyFree(void *address);
32
33 #ifdef _WIN32
34
35 void SetLargePageSize();
36
37 void *MidAlloc(size_t size);
38 void MidFree(void *address);
39 void *BigAlloc(size_t size);
40 void BigFree(void *address);
41
42 #else
43
44 #define MidAlloc(size) MyAlloc(size)
45 #define MidFree(address) MyFree(address)
46 #define BigAlloc(size) MyAlloc(size)
47 #define BigFree(address) MyFree(address)
48
49 #endif
50
51 #endif