diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-04 14:39:44 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-04 14:39:44 +0200 |
| commit | 354f46f41bfe08be1e9f144389d3333cfc49f2f4 (patch) | |
| tree | 4ef79a38eb15bd9a46b6ea192b7be4d4eaebb5ce /src/include | |
| parent | b34a50b38160d8455763773888130ecc4e18042a (diff) | |
| download | box64-354f46f41bfe08be1e9f144389d3333cfc49f2f4.tar.gz box64-354f46f41bfe08be1e9f144389d3333cfc49f2f4.zip | |
Some refactor (and small bugfixes) around Custom Mem Manager
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/custommem.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/custommem.h b/src/include/custommem.h index ba5441d1..653af5e2 100644 --- a/src/include/custommem.h +++ b/src/include/custommem.h @@ -7,9 +7,16 @@ typedef struct box64context_s box64context_t; void* customMalloc(size_t size); +void* customMalloc32(size_t size); void* customCalloc(size_t n, size_t size); +void* customCalloc32(size_t n, size_t size); void* customRealloc(void* p, size_t size); +void* customRealloc32(void* p, size_t size); +void* customMemAligned(size_t align, size_t size); +void* customMemAligned32(size_t align, size_t size); void customFree(void* p); +void customFree32(void* p); +size_t customGetUsableSize(void* p); #define kcalloc customCalloc #define kmalloc customMalloc @@ -18,6 +25,10 @@ void customFree(void* p); #define ALIGN(p) (((p)+box64_pagesize-1)&~(box64_pagesize-1)) +#ifndef MAP_32BIT +#define MAP_32BIT 0x40 +#endif + #ifdef DYNAREC typedef struct dynablock_s dynablock_t; // custom protection flag to mark Page that are Write protected for Dynarec purpose |