set up the new Entries array.

This commit is contained in:
Christoph Oelckers 2023-12-12 18:17:33 +01:00
commit ae1bd3c890
17 changed files with 346 additions and 49 deletions

View file

@ -104,10 +104,12 @@ StringPool::Block *StringPool::AddBlock(size_t size)
return mem;
}
void *StringPool::iAlloc(size_t size)
void *StringPool::Alloc(size_t size)
{
Block *block;
size = ((size)+8) & ~7;
for (block = TopBlock; block != nullptr; block = block->NextBlock)
{
void *res = block->Alloc(size);
@ -122,7 +124,7 @@ void *StringPool::iAlloc(size_t size)
const char* StringPool::Strdup(const char* str)
{
char* p = (char*)iAlloc((strlen(str) + 8) & ~7 );
char* p = (char*)Alloc(strlen(str));
strcpy(p, str);
return p;
}