Berkeley CSUA MOTD:2010:February:12 Friday <Thursday, Saturday>
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2010/2/12-3/9 [Politics/Domestic, Politics/Domestic/Crime] UID:53707 Activity:nil
2/12    Tea Party rallies: "tea bag libs before they tea bag you":
        http://news.yahoo.com/s/ynews/20100211/ts_ynews/ynews_ts1129
        \_ http://en.wikipedia.org/wiki/Teabagging
2010/2/12-3/9 [Computer/SW/Languages/C_Cplusplus] UID:53708 Activity:nil
2/12    I need a way to make a really big C++ executable (~200MBs) that does
        nothing.  No static initialization either.  Any ideas?
        \_ static link in lots of libraries?
        \_ #define a   i=0; i=0; i=0; i=0; i=0; i=0; i=0; i=0; i=0; i=0;
           #define b   a a a a a a a a a a
           #define c   b b b b b b b b b b
           #define d   c c c c c c c c c c
           #define e   d d d d d d d d d d
           #define f   e e e e e e e e e e
           #define g   f f f f f f f f f f
           int main(int argc, char *argv[])
           {
               volatile int i = 0;
               if (i == 0) return 0;
               g g g
               return 0;
           }
           This should give you about 210MB in both Linux and Win32.
           This should give you about 210MB in both Linux and Win32 on x86
           machines.
           \_ I like you. Best motd answer, EVAR.
           \_ Wow, thanks.  That's cool.
        \_ Just wondering, what is this for?
           \_ At work we're porting a very large code to a new platform.
              The executable was seg faulting and I just figured out that
              the system probably can't handle executables larger than
              ~100 MBs.  (It turned out to be about 54MBs really).  I
              needed a reproducer. -op
Berkeley CSUA MOTD:2010:February:12 Friday <Thursday, Saturday>