Script: Allow changing ops limit and memory limit settings in game

This commit is contained in:
Jonathan G Rennison
2020-09-14 18:04:19 +01:00
parent 15fc3f5ba3
commit 45386efcd0
6 changed files with 82 additions and 2 deletions

View File

@@ -129,6 +129,13 @@ size_t Squirrel::GetAllocatedMemory() const noexcept
return this->allocator->allocated_size;
}
void Squirrel::SetMemoryAllocationLimit(size_t limit) noexcept
{
if (this->allocator != nullptr) {
this->allocator->allocation_limit = limit;
}
}
void Squirrel::CompileError(HSQUIRRELVM vm, const SQChar *desc, const SQChar *source, SQInteger line, SQInteger column)
{