-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathz_zone.h
46 lines (42 loc) · 1.51 KB
/
z_zone.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id:$
//
// Copyright (C) 1993-1996 by id Software, Inc.
// Copyright (C) 2023-2024 by Frenkel Smeijers
//
// This source is available for distribution and/or modification
// only under the terms of the DOOM Source Code License as
// published by id Software. All rights reserved.
//
// The source is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
// for more details.
//
// DESCRIPTION:
// Zone Memory Allocation, perhaps NeXT ObjectiveC inspired.
// Remark: this was the only stuff that, according
// to John Carmack, might have been useful for
// Quake.
//
//---------------------------------------------------------------------
#ifndef __Z_ZONE__
#define __Z_ZONE__
#include <stddef.h>
#include "doomtype.h"
void Z_Init(void);
boolean Z_IsEnoughFreeMemory(uint16_t size);
uint32_t Z_GetLargestFreeBlockSize(void);
void __far* Z_MallocStatic(uint16_t size);
void __far* Z_MallocStaticWithUser(uint16_t size, void __far*__far* user);
void __far* Z_MallocLevel(uint16_t size, void __far*__far* user);
void __far* Z_CallocLevel(uint16_t size);
void __far* Z_CallocLevSpec(uint16_t size);
void Z_ChangeTagToStatic(const void __far* ptr);
void Z_ChangeTagToCache(const void __far* ptr);
void Z_Free(const void __far* ptr);
void Z_FreeTags(void);
void Z_CheckHeap(void);
#endif