Pull in zone.c from dquakeplus

This commit is contained in:
cypress 2024-09-04 19:14:47 -07:00
parent e86beee7a9
commit 19bd2f273d
2 changed files with 681 additions and 230 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,7 @@
/*
Copyright (C) 1996-1997 Id Software, Inc.
Copyright (C) 1996-2001 Id Software, Inc.
Copyright (C) 2002-2009 John Fitzgibbons and others
Copyright (C) 2010-2014 QuakeSpasm developers
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -8,7 +10,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
@ -17,6 +19,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __ZZONE_H
#define __ZZONE_H
/*
memory allocation
@ -85,19 +91,20 @@ Zone block
void Memory_Init (void *buf, int size);
void *Q_malloc (size_t size); // joe
void *Q_calloc (size_t n, size_t size); //
void *Q_realloc (void *ptr, size_t size); //
void *Q_strdup (const char *str); //
void Z_Free (void *ptr);
void *Z_Malloc (int size); // returns 0 filled memory
void *Z_TagMalloc (int size, int tag);
void Z_DumpHeap (void);
void Z_CheckHeap (void);
int Z_FreeMemory (void);
char *Z_Strdup (const char *s);
void *Z_Realloc (void *ptr, int size);
char *Z_Strdup (char *s);
void *Hunk_Alloc (int size); // returns 0 filled memory
void *Hunk_AllocName (int size, char *name);
void *Hunk_HighAllocName (int size, char *name);
char *Hunk_Strdup (char *s, char *name);
int Hunk_LowMark (void);
void Hunk_FreeToLowMark (int mark);
@ -128,5 +135,8 @@ void *Cache_Alloc (cache_user_t *c, int size, char *name);
void Cache_Report (void);
#ifdef PSP_VFPU
void* memcpy_vfpu(void* dst, void* src, unsigned int size);
#endif // PSP_VFPU
#endif /* __ZZONE_H */