mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 11:21:11 +00:00
Merge branch 'next' into 2.2.1-prep
This commit is contained in:
commit
13e5911de7
3 changed files with 17 additions and 11 deletions
|
@ -1120,6 +1120,9 @@ static const char *credits[] = {
|
||||||
"\1Sonic Robo Blast II",
|
"\1Sonic Robo Blast II",
|
||||||
"\1Credits",
|
"\1Credits",
|
||||||
"",
|
"",
|
||||||
|
"\1Producer",
|
||||||
|
"Rob Tisdell",
|
||||||
|
"",
|
||||||
"\1Game Design",
|
"\1Game Design",
|
||||||
"Ben \"Mystic\" Geyer",
|
"Ben \"Mystic\" Geyer",
|
||||||
"\"SSNTails\"",
|
"\"SSNTails\"",
|
||||||
|
@ -1234,7 +1237,7 @@ static const char *credits[] = {
|
||||||
"Thomas \"Shadow Hog\" Igoe",
|
"Thomas \"Shadow Hog\" Igoe",
|
||||||
"Alexander \"DrTapeworm\" Moench-Ford",
|
"Alexander \"DrTapeworm\" Moench-Ford",
|
||||||
"\"Kaito Sinclaire\"",
|
"\"Kaito Sinclaire\"",
|
||||||
"\"QueenDelta\"",
|
"Anna \"QueenDelta\" Sandlin",
|
||||||
"Wessel \"sphere\" Smit",
|
"Wessel \"sphere\" Smit",
|
||||||
"\"Spazzo\"",
|
"\"Spazzo\"",
|
||||||
"\"SSNTails\"",
|
"\"SSNTails\"",
|
||||||
|
|
|
@ -3256,8 +3256,8 @@ void G_AddGametypeConstant(INT16 gtype, const char *newgtconst)
|
||||||
{
|
{
|
||||||
size_t r = 0; // read
|
size_t r = 0; // read
|
||||||
size_t w = 0; // write
|
size_t w = 0; // write
|
||||||
char *gtconst = Z_Calloc(strlen(newgtconst) + 3, PU_STATIC, NULL);
|
char *gtconst = Z_Calloc(strlen(newgtconst) + 4, PU_STATIC, NULL);
|
||||||
char *tmpconst = Z_Calloc(strlen(newgtconst), PU_STATIC, NULL);
|
char *tmpconst = Z_Calloc(strlen(newgtconst) + 1, PU_STATIC, NULL);
|
||||||
|
|
||||||
// Copy the gametype name.
|
// Copy the gametype name.
|
||||||
strcpy(tmpconst, newgtconst);
|
strcpy(tmpconst, newgtconst);
|
||||||
|
|
19
src/z_zone.c
19
src/z_zone.c
|
@ -232,12 +232,12 @@ void Z_Free(void *ptr)
|
||||||
|
|
||||||
// Free the memory and get rid of the block.
|
// Free the memory and get rid of the block.
|
||||||
free(block->real);
|
free(block->real);
|
||||||
block->prev->next = block->next;
|
|
||||||
block->next->prev = block->prev;
|
|
||||||
free(block);
|
|
||||||
#ifdef VALGRIND_DESTROY_MEMPOOL
|
#ifdef VALGRIND_DESTROY_MEMPOOL
|
||||||
VALGRIND_DESTROY_MEMPOOL(block);
|
VALGRIND_DESTROY_MEMPOOL(block);
|
||||||
#endif
|
#endif
|
||||||
|
block->prev->next = block->next;
|
||||||
|
block->next->prev = block->prev;
|
||||||
|
free(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** malloc() that doesn't accept failure.
|
/** malloc() that doesn't accept failure.
|
||||||
|
@ -317,13 +317,9 @@ void *Z_MallocAlign(size_t size, INT32 tag, void *user, INT32 alignbits)
|
||||||
// The mem header lives 'sizeof (memhdr_t)' bytes before given.
|
// The mem header lives 'sizeof (memhdr_t)' bytes before given.
|
||||||
hdr = (memhdr_t *)((UINT8 *)given - sizeof *hdr);
|
hdr = (memhdr_t *)((UINT8 *)given - sizeof *hdr);
|
||||||
|
|
||||||
#ifdef VALGRIND_CREATE_MEMPOOL
|
#ifdef HAVE_VALGRIND
|
||||||
VALGRIND_CREATE_MEMPOOL(block, padsize, Z_calloc);
|
|
||||||
Z_calloc = false;
|
Z_calloc = false;
|
||||||
#endif
|
#endif
|
||||||
#ifdef VALGRIND_MEMPOOL_ALLOC
|
|
||||||
VALGRIND_MEMPOOL_ALLOC(block, hdr, size + sizeof *hdr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
block->next = head.next;
|
block->next = head.next;
|
||||||
block->prev = &head;
|
block->prev = &head;
|
||||||
|
@ -341,6 +337,13 @@ void *Z_MallocAlign(size_t size, INT32 tag, void *user, INT32 alignbits)
|
||||||
block->size = blocksize;
|
block->size = blocksize;
|
||||||
block->realsize = size;
|
block->realsize = size;
|
||||||
|
|
||||||
|
#ifdef VALGRIND_CREATE_MEMPOOL
|
||||||
|
VALGRIND_CREATE_MEMPOOL(block, padsize, Z_calloc);
|
||||||
|
#endif
|
||||||
|
//#ifdef VALGRIND_MEMPOOL_ALLOC
|
||||||
|
// VALGRIND_MEMPOOL_ALLOC(block, hdr, size + sizeof *hdr);
|
||||||
|
//#endif
|
||||||
|
|
||||||
hdr->id = ZONEID;
|
hdr->id = ZONEID;
|
||||||
hdr->block = block;
|
hdr->block = block;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue