From: cloudwalk Date: Wed, 12 Aug 2020 14:54:08 +0000 (+0000) Subject: sys: Initialize the memory subsystem in main() X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=b4ab81bedb237ddbf81675531e0c58b07ad6b07b sys: Initialize the memory subsystem in main() git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12896 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 35d84307..c9a0ca3f 100644 --- a/host.c +++ b/host.c @@ -659,9 +659,6 @@ static void Host_Init (void) if (COM_CheckParm("-nostdout")) sys_nostdout = 1; - // used by everything - Memory_Init(); - // initialize console command/cvar/alias/command execution systems Cmd_Init(); diff --git a/sys_sdl.c b/sys_sdl.c index 8667f722..50186991 100644 --- a/sys_sdl.c +++ b/sys_sdl.c @@ -220,6 +220,9 @@ int main (int argc, char *argv[]) // we don't know which systems we'll want to init, yet... SDL_Init(0); + // used by everything + Memory_Init(); + Host_Main(); Sys_Quit(0); diff --git a/sys_unix.c b/sys_unix.c index 70e4bd56..7fdd1df9 100644 --- a/sys_unix.c +++ b/sys_unix.c @@ -164,6 +164,10 @@ int main (int argc, char **argv) #ifndef WIN32 fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK); #endif + + // used by everything + Memory_Init(); + Host_Main(); Sys_Quit(0); diff --git a/sys_win.c b/sys_win.c index 12b4174a..8ddf7e90 100644 --- a/sys_win.c +++ b/sys_win.c @@ -361,6 +361,9 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin Sys_ProvideSelfFD(); + // used by everything + Memory_Init(); + Host_Main(); Sys_Quit(0);