Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/yabause/src/dreamcast/sh2rec/sh2rec_mem.h
2 views
1
/* Copyright 2010 Lawrence Sebald
2
3
This file is part of Yabause.
4
5
Yabause is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
10
Yabause is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with Yabause; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
20
#ifndef SH2REC_MEM_H
21
#define SH2REC_MEM_H
22
23
/* Initial allocation of memory: 1MB */
24
#define SH2REC_MEM_INITIAL (1024 * 1024)
25
26
/* Size of future allocations: 256KB */
27
#define SH2REC_MEM_ALLOCSZ (256 * 1024)
28
29
/* Maximum allocation of memory: 2MB */
30
#define SH2REC_MEM_MAX (2 * 1024 * 1024)
31
32
/* Fudge factor... make sure at least this much is in any block above the
33
inital request */
34
#define SH2REC_MEM_FUDGE 48
35
36
int sh2rec_mem_init(void);
37
void sh2rec_mem_shutdown(void);
38
39
void *sh2rec_mem_alloc(int sz);
40
int sh2rec_mem_expand(void *block, int amt);
41
void sh2rec_mem_free(void *block);
42
43
#endif /* !SH2REC_MEM_H */
44
45