Error: operand out of range
Hi,
I need to write a simple app that is huge in size (256 MB) but I can only got it up to 31 MB and got compiler error if I went greater than 32 MB.
/tmp/cc7Ax35n.s:246: Error: operand out of range (0x02000004 is not between 0xfe000000 and 0x01ffffff).
I tried to change ulimit -l and -s options but it didn't help.
Does anyone know why I got the compiler error and how to fix it?
I am running RHEL 5.4. Thanks.
Here is my huge.c code:
=====================
#include <stdio.h>
void huge(void);
int main(int argc, char** argv) {
huge();
return (0);
}
void huge()
{
int x=0;
printf(">>> HUGE FILE LOADS ");
if (x==0) {
goto PRINT_N_EXIT;
}
__asm__(".ds.b 32*1024*1024\n\t");
PRINT_N_EXIT:
printf("OK !!!\n");
return;
}
==================================
|