]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
sys: Initialize the memory subsystem in main()
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 12 Aug 2020 14:54:08 +0000 (14:54 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 12 Aug 2020 14:54:08 +0000 (14:54 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12896 d7cf8633-e32d-0410-b094-e92efae38249

host.c
sys_sdl.c
sys_unix.c
sys_win.c

diff --git a/host.c b/host.c
index 35d843078f45c2bb0da741b78492ee7ad7313864..c9a0ca3f4f0ee764e29353138e479f5ee73941fe 100644 (file)
--- 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();
 
index 8667f7222333d81848d6497458d12ab27f097827..50186991e47ee30bfa67daf1fc66bef22286f879 100644 (file)
--- 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);
index 70e4bd560078da876e16a345aac72a3b54c87be9..7fdd1df970917562f9aefa0b08cc39b875626d30 100644 (file)
@@ -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);
index 12b4174a2ea653f7fd15bc86f8528aa79e7d314b..8ddf7e90b8c0651fe4f760bfb6bcd8b6fd474475 100644 (file)
--- 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);