Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 04-01-2010, 07:41 PM   #1
LQ Newbie
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Question Error: operand out of range


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) {
return (0);

void huge()
int x=0;
printf(">>> HUGE FILE LOADS ");
if (x==0) {
__asm__(".ds.b 32*1024*1024\n\t");

printf("OK !!!\n");
Old 04-02-2010, 08:12 AM   #2
LQ Newbie
Registered: Apr 2009
Location: Utah
Distribution: fedora and red hat enterprise
Posts: 6

Rep: Reputation: 0
Have you checked the /etc/profile to see if ulimit isn't set for the whole system?

I ran your program on my system, even with 256 MB and was able to get it to run.




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
integer operand out of range jixiaodong1124 Linux - Newbie 1 06-24-2008 05:15 AM
unexpected operator/operand in Bourne script ocicat Programming 4 07-28-2007 05:44 PM
Error in building world: warning: operand 1 missing mode? henkelarsson12 *BSD 0 04-14-2006 02:14 PM
invalid `asm': operand number out of range Annie0716 Programming 4 08-05-2004 03:57 AM
invalid operand 0000 x2000koh Linux - General 3 07-03-2003 08:50 AM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration