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 10 4670
<11**********************@g14g2000cwa.googlegroups .com> sc*****@hotpop.com wrote: This was not an issue until I added some code to two of my c files.
If you get this error during compilation, it's a Borland problem, not
a C problem. Take it to the groups at newsgroups.borland.com and you'll
get a solution rather than flames.
--
Christopher Benson-Manica
ataru(at)cyberspace.org sc*****@hotpop.com wrote: 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?
Did you try to ask in a newsgroup devoted to Borland C++ ?
In article <d0**********@news-rocq.inria.fr>,
Grumble <de*****@kma.eu.org> wrote: sc*****@hotpop.com wrote:
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?
Did you try to ask in a newsgroup devoted to Borland C++ ?
Well, the obvious answer is: delete that code that caused the problem.
The somewhat less obvious answer is: post the code that caused the problem
here, so we can tell you what's wrong with it. ga*****@yin.interaccess.com (Kenny McCormack) writes: In article <d0**********@news-rocq.inria.fr>, Grumble <de*****@kma.eu.org> wrote:sc*****@hotpop.com wrote:
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?
Did you try to ask in a newsgroup devoted to Borland C++ ?
Well, the obvious answer is: delete that code that caused the problem.
The somewhat less obvious answer is: post the code that caused the problem here, so we can tell you what's wrong with it.
That's unlikely to be useful. 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, but I don't think that's the case here given
the resources available on the system). This is a Borland-specific
problem; we lack the expertise to help you with it here.
--
Keith Thompson (The_Other_Keith) 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.
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.org> wrote: ga*****@yin.interaccess.com (Kenny McCormack) writes: In article <d0**********@news-rocq.inria.fr>, Grumble <de*****@kma.eu.org> wrote:sc*****@hotpop.com wrote:
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?
Did you try to ask in a newsgroup devoted to Borland C++ ?
Well, the obvious answer is: delete that code that caused the problem.
The somewhat less obvious answer is: post the code that caused the problem here, so we can tell you what's wrong with it.
That's unlikely to be useful. 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, but I don't think that's the case here given the resources available on the system). This is a Borland-specific problem; we lack the expertise to help you with it here.
Help *me* with it? Surely, you mean "help the OP".
Anyway, get serious. One of the basic tenets of this NG is that if you
"invoke UB", anything can happen - and "anything" surely includes a compiler
blowing memory. Remember, the OP did say that it was working until he
added "a couple of lines of code". What if those "couple of lines of code"
were declaring a very (very!) large automatic variable (array)?
Yes, I am aware there is a grey area here (between compile-time behavior
and run-time behavior), but these days, those lines are blurred. My bet is
there's something wrong with those lines of code (or his story isn't
accurate). ga*****@yin.interaccess.com (Kenny McCormack) writes: In article <ln************@nuthaus.mib.org>, Keith Thompson <ks***@mib.org> wrote:ga*****@yin.interaccess.com (Kenny McCormack) writes:
[...] The somewhat less obvious answer is: post the code that caused the problem here, so we can tell you what's wrong with it. That's unlikely to be useful. 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, but I don't think that's the case here given the resources available on the system). This is a Borland-specific problem; we lack the expertise to help you with it here.
Help *me* with it? Surely, you mean "help the OP".
Of course.
Anyway, get serious. One of the basic tenets of this NG is that if you "invoke UB", anything can happen - and "anything" surely includes a compiler blowing memory. Remember, the OP did say that it was working until he added "a couple of lines of code". What if those "couple of lines of code" were declaring a very (very!) large automatic variable (array)?
Declaring a large array uses memory at run time, not at compilation time.
If the "couple of lines of code" invoke undefined behavior, all we'd
be able to tell the OP is that they invoke undefined behavior.
There's no way we could guess that they could cause the compiler to
run out of memory.
Yes, I am aware there is a grey area here (between compile-time behavior and run-time behavior), but these days, those lines are blurred. My bet is there's something wrong with those lines of code (or his story isn't accurate).
My bet is that there's something wrong with the compiler.
--
Keith Thompson (The_Other_Keith) 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.
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) };
--
Peter
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.
BC1 multiplies the original expression character count by two,
then it adds 3 chars.
The other expressions multiply the character count by two
and then add 5 chars!!!
Assuming the original character count is N we have
BC1 = (2*N+3) ---------->5
BC2 = 2*(2*N+3) + 5 ----->15
BC3 = 2*(2*(2*N+3) + 5 ) + 5 )-->60
etc, this grows geometrically.
Please turn on your brain before complaining...
jacob
In article <11*********************@l41g2000cwc.googlegroups. com>,
Peter Nilsson <ai***@acay.com.au> 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) };
-- Peter
Right! That's what I was thinking of - a good example of compile-time UB.
jacob navia <ja***@jacob.remcomp.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_Keith) 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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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:
...
|
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...
|
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;...
|
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...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
| |