Enable memory tracking on an environment variable.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4743 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2024-01-08 02:18:10 +00:00
parent 8a1a182479
commit 0fb341f378

View File

@ -594,7 +594,9 @@ static void _error_handler(int sig)
static void _startup(int argc, char* argv[])
{
bool tracking = false;
char buffer[8] = { 0 };
size_t buffer_size = sizeof(buffer);
bool tracking = uv_os_getenv("TF_MEM_TRACKING", buffer, &buffer_size) == 0 && strcmp(buffer, "1") == 0;
for (int i = 1; i < argc; i++)
{
if (strcmp(argv[i], "sandbox") == 0)