Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:36:13 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
df91541502 Ed H*0001 /*
                0002 //BOP
                0003 // !ROUTINE: setrlstk
                0004 // !INTERFACE:
                0005    setrlstk()
                0006 
                0007 // !DESCRIPTION:
                0008 // Unlimit the size of the stack using setrlimit().
                0009 
                0010 //EOP
                0011 
                0012 */
                0013 
                0014 /*  Here, we get the definition of the FC_NAMEMANGLE() macro. */
                0015 #include "FC_NAMEMANGLE.h"
                0016 
                0017 /* #define FC_NAMEMANGLE(X) X ## _ */
bc76c8dd5b Ed H*0018 #ifdef HAVE_SETRLSTK
df91541502 Ed H*0019 #include <sys/time.h>
                0020 #include <sys/resource.h>
                0021 #include <unistd.h>
bc76c8dd5b Ed H*0022 #endif
df91541502 Ed H*0023 
                0024 /* int main( int argc, char ** argv ) */
                0025 void FC_NAMEMANGLE(setrlstk) ()
                0026 {
bc76c8dd5b Ed H*0027 #ifdef HAVE_SETRLSTK
df91541502 Ed H*0028     struct rlimit rls;
                0029 
                0030     rls.rlim_cur = RLIM_INFINITY;
                0031     rls.rlim_max = RLIM_INFINITY;
                0032     setrlimit(RLIMIT_STACK, &rls);
                0033     /*  system("ulimit -a");  */
bc76c8dd5b Ed H*0034 #endif
df91541502 Ed H*0035     return;
                0036 }
                0037 
                0038