473,769 Members | 7,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Out of Memory" error during Borland C++ 5.02 compile

Why?
Running on windows 2000 with all updates, 2G Memory, 117G Hard Drive
space available.

This was not an issue until I added some code to two of my c files.
Any suggestions?
Thanks

Nov 14 '05
10 4706
jacob navia <ja***@jacob.re mcomp.fr> writes:
Peter Nilsson wrote:
Keith Thompson wrote:
... There is no C construct that would be expected to cause a
compiler to run out of memory (unless it's just an incredibly
huge program, ... It doesn't have to be 'incredibly huge'. The following 21 lines
crashes my port of gcc...
#define BC1(p) p,1+p
#define BC2(p) BC1(p),BC1(1+p)
#define BC3(p) BC2(p),BC2(1+p)
#define BC4(p) BC3(p),BC3(1+p)
#define BC5(p) BC4(p),BC4(1+p)
#define BC6(p) BC5(p),BC5(1+p)
#define BC7(p) BC6(p),BC6(1+p)
#define BC8(p) BC7(p),BC7(1+p)
#define BC9(p) BC8(p),BC8(1+p)
#define BC10(p) BC9(p),BC9(1+p)
#define BC11(p) BC10(p),BC10(1+ p)
#define BC12(p) BC11(p),BC11(1+ p)
#define BC13(p) BC12(p),BC12(1+ p)
#define BC14(p) BC13(p),BC13(1+ p)
#define BC15(p) BC14(p),BC14(1+ p)
#define BC16(p) BC15(p),BC15(1+ p)
#define BC17(p) BC16(p),BC16(1+ p)
#define BC18(p) BC17(p),BC17(1+ p)
#define BC19(p) BC18(p),BC18(1+ p)
#define BC20(p) BC19(p),BC19(1+ p)
unsigned char bc[] = { BC20(0) };


"It doesn't to be incredible huge???????"

The expansion of that makes lcc-win32 use more than 1GB
RAM.

[...]

No, it doesn't have to be incredibly huge. That 1GB of RAM was
consumed while compiling just 21 lines of C source. It doesn't become
"incredibly huge" until it reaches the compiler's internals
(presumably the preprocessor).

The C construct in question is the above 21 lines, not whatever the
preprocessor generates internally.

(And yes, that means there's a case I missed in my previous remarks,
but I doubt that this is related to the OP's problem.)
Please turn on your brain before complaining...


Who was complaining, and whose brain needs to be turned on?

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6665
by: Snake Djip | last post by:
Hi, I have a problem with a home-made DLL used in an ASP environment. It is coded in VB6, apartment-threaded. The DLL returns a binary PNG stream (an image). I use it with ASP's Response.BinaryWrite to display a dynamic image on a web page. The server is Windows 2000 SP4.
0
4070
by: John Bonds | last post by:
I have designed a multi-threaded application that manipulates images (CCITT Group 4 TIFF Images). I'm getting some strange behavior and I'm wondering if anyone else is seeing the same thing. I run a batch process that reads in pages of one of these TIFF files, separates them out into different TIFF files, saves them to a file (in a new thread) and disposes properly of all the memory that was used. I run this batch process and monitor the...
3
3995
by: gambler | last post by:
let's say you have: var games = new Array(); games = new GAME(gameNum, rotNum1, rotNum2, ... ); ( so a sparsley populate array which enables me to locate a game usin the game number without having to implement a "search" function on th games array
11
5277
by: Shane Suebsahakarn | last post by:
Hi all, This might be one of those things for which there is no workaround. I'm using A2K2, and using it to perform a very large batch ouput. Both the front and back ends are MDB files, so no SQL Server involved here. Both SP3 and Jet SP8 have been updated, and the platform is running on a dual-processor 3Ghz Xeon Win2K3 Server box with 2GB RAM. The batch run outputs 6 or 7 reports to approximately 16-17,000 snapshot files None of the...
0
1579
by: SC | last post by:
I'm a newie in .net, and here is my problem. I have a windows application that pass trough a proxy to access a webservice. I use the following code to set the proxy: GlobalProxySelection.Select = new WebProxy(new Uri("http://ip:port/"),true); GlobalProxySelection.Select.Credentials = new NetworkCredential(usr, pass); Well, the problem is that i get an "The operation has timed-out" error. I try a lot of different ways to set the...
2
1914
by: WJScott69 | last post by:
C# - CSharp - WIN32 - WMI Progamming Issues with NT4 (Out of Memory) Hello, I am trying to inquire on servers ranging from Windows NT4 SP6a+ to Windows 2000-2003 I have the program working fine on all but the NT4 where I get a Out of Memory error. Please take a look at the enclosed project and let me know how I go about resolving this. I can get results from NT4 server but dont seem to be able to collect everything I need. I have even...
4
6878
by: Rachel McConnell | last post by:
Hello, I have a Java web application using Hibernate to connect to a PostgreSQL backend. I am seeing the below stack trace during processing of a set of data consisting of around 1000 objects; for a 200 object set I don't see the exception. I believe the salient point is the Out Of Memory bit - marked below by *****'s The fact that this exception occurs during a call to
4
6938
by: lawrence k | last post by:
I've a jpeg image that is 514k, which doesn't strike me as very large. Yet I'm running out of error when I try to resize it: Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 12288 bytes) in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/resizeImageToSquare.php on line 82 How can I protect against out-of-memory errors?
1
1039
by: =?Utf-8?B?QXJuZSBCZXJ1bGRzZW4=?= | last post by:
I'm relatively new to vb.net (2005) and I continually experience an out of memory exception during the development process...and this is becoming a big pain!! I have 2gigs of memory and this never happened in vb6. Is there something I can do to fix this? Thanks
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10048
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3963
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.