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 |