 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Paul at NCF Guest
|
Posted: Tue Apr 24, 2007 8:10 am Post subject: "Out Of Memory" Exception? |
|
|
Hi,
We're running a larget BCB6 Pro project and after 10-15 minutes of activity
an Out Of Memory Exception occurs, stack points to a request for memory
"uchar * ptr = new uchar [1060]". The application continues to run
successfully (when run outside the debugger). CodeGuard is switch on and
we're not getting any errors during the run. TaskMan shows no memory
issues.
Does anyone have any clues or ideas from previous experience?
Regards,
Paul |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Apr 24, 2007 8:10 am Post subject: Re: "Out Of Memory" Exception? |
|
|
"Paul at NCF" <notplmacca (AT) clara (DOT) co.uk> wrote in message
news:462daa08$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Does anyone have any clues or ideas from previous experience?
|
For such a small allocation to fail so early in the process's
lifetime, I can only imagine that you must be seriously fragmenting
memory to the point where allocations can't be satisfied anymore.
What is your program doing to begin with?
Gambit |
|
| Back to top |
|
 |
Pete Fraser Guest
|
Posted: Tue Apr 24, 2007 8:10 am Post subject: Re: "Out Of Memory" Exception? |
|
|
try using memproof from automatedqa.com to see if you have
any memory problems - it's free.
HTH Pete
"Paul at NCF" <notplmacca (AT) clara (DOT) co.uk> wrote in message
news:462daa08$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi,
We're running a larget BCB6 Pro project and after 10-15
minutes of activity an Out Of Memory Exception occurs,
stack points to a request for memory "uchar * ptr = new
uchar [1060]". The application continues to run
successfully (when run outside the debugger). CodeGuard
is switch on and we're not getting any errors during the
run. TaskMan shows no memory issues.
Does anyone have any clues or ideas from previous
experience? |
|
|
| Back to top |
|
 |
Paul at NCF Guest
|
Posted: Wed Apr 25, 2007 2:36 am Post subject: Re: "Out Of Memory" Exception? |
|
|
Hi Remy,
Its something I have been doing for sometime (with help from the newsgroup).
We've ported an old embedded 186 system to run under the Win32 environment.
Its a ticket machine with a lot of peripherals (serial), it accesses a
server using TCP-IP, and I've got a SysLog client for remote diagnostic
output.
I was thinking that it may be fragmentation, as the underlying architecure
for running the orignally embedded tasks is well tested now and we get no
issues in any of the test harnesses and soak tests (which test each part in
isolation). And with Code Guard running, its not picking up anything
either. It doesn't really have a GUI, only a small edit window for showing
debug output (which again is common with all the test harnesses, and some of
the serial and UDP soak tests can run for days and days and never show a
problem).
I know Code Guard doesn't pick up memory leaks in VCL, but as mentioned the
memory usage is low and shows no symptoms of leaking in perfmon or taskman.
Perhaps I'll switch off or lower the diagnostic level output (edit window
and syslog) to see if it makes a difference.
If the memory is being fragmented, perhaps quicker than the heap manager can
tidy it, whats the solution?
Regards
Paul
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote in message
news:462db619$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
"Paul at NCF" <notplmacca (AT) clara (DOT) co.uk> wrote in message
news:462daa08$1 (AT) newsgroups (DOT) borland.com...
Does anyone have any clues or ideas from previous experience?
For such a small allocation to fail so early in the process's
lifetime, I can only imagine that you must be seriously fragmenting
memory to the point where allocations can't be satisfied anymore.
What is your program doing to begin with?
Gambit
|
|
|
| Back to top |
|
 |
Paul at NCF Guest
|
Posted: Wed Apr 25, 2007 8:10 am Post subject: Re: "Out Of Memory" Exception? |
|
|
Thanks, I'll give this a go.
I've also downloaded the latest FastMM to see if I can include it in my BCB6
project instead of Borland's memory manager.
"Pete Fraser" <pete.nospam.fraser.nospam (AT) frasersoft (DOT) nospam.net> wrote in
message news:462db912$1 (AT) newsgroups (DOT) borland.com...
| Quote: | try using memproof from automatedqa.com to see if you have any memory
problems - it's free.
HTH Pete
"Paul at NCF" <notplmacca (AT) clara (DOT) co.uk> wrote in message
news:462daa08$1 (AT) newsgroups (DOT) borland.com...
Hi,
We're running a larget BCB6 Pro project and after 10-15 minutes of
activity an Out Of Memory Exception occurs, stack points to a request for
memory "uchar * ptr = new uchar [1060]". The application continues to
run successfully (when run outside the debugger). CodeGuard is switch on
and we're not getting any errors during the run. TaskMan shows no memory
issues.
Does anyone have any clues or ideas from previous experience?
|
|
|
| Back to top |
|
 |
Paul at NCF Guest
|
Posted: Thu Apr 26, 2007 8:10 am Post subject: Re: "Out Of Memory" Exception? |
|
|
Hi,
I've seen numerous reports of strange Out Of Memory errors within the BCB
Groups, so it doesn't seem to be an unknown (which is now worrying me).
Has anyone used FastMM4 with BCB6, and are there any issues I should be
aware of?
Regards,
Paul
"Paul at NCF" <notplmacca (AT) clara (DOT) co.uk> wrote in message
news:462daa08$1 (AT) newsgroups (DOT) borland.com...
| Quote: | We're running a larget BCB6 Pro project and after 10-15 minutes of
activity an Out Of Memory Exception occurs, stack points to a request for
memory "uchar * ptr = new uchar [1060]". The application continues to run
successfully (when run outside the debugger). CodeGuard is switch on and
we're not getting any errors during the run. TaskMan shows no memory
issues. |
|
|
| Back to top |
|
 |
Dennis Cote Guest
|
Posted: Thu Apr 26, 2007 7:44 pm Post subject: Re: "Out Of Memory" Exception? |
|
|
Paul at NCF wrote:
| Quote: | Hi,
We're running a larget BCB6 Pro project and after 10-15 minutes of activity
an Out Of Memory Exception occurs, stack points to a request for memory
"uchar * ptr = new uchar [1060]". The application continues to run
successfully (when run outside the debugger). CodeGuard is switch on and
we're not getting any errors during the run. TaskMan shows no memory
issues.
Does anyone have any clues or ideas from previous experience?
|
Paul,
I have had similar strange memory allocation failures. I have posted
about it a couple of times. It seems to be related to CodeGuard. I
haven't been able to look into further for quite some time. There might
be some useful info in my previous posts (then again there might not).
Look at the thread "A comedy of errros" in borland.public.cppbuilder.ide
or at the archive at
http://216.101.185.148/scripts/isapi.dll/thread?id=64512133&thread=1554129
Please let us know if you find anything.
Dennis Cote |
|
| Back to top |
|
 |
Dennis Cote Guest
|
Posted: Thu Apr 26, 2007 8:57 pm Post subject: Re: "Out Of Memory" Exception? |
|
|
Dennis Cote wrote:
Oops, Sorry about the bad link.
Try http://www.tamaracka.com/ and enter the "comedy of errors" in the
search box.
Dennis Cote |
|
| Back to top |
|
 |
Paul at NCF Guest
|
Posted: Fri Apr 27, 2007 8:10 am Post subject: Re: "Out Of Memory" Exception? |
|
|
Hi,
Yep this seems to be similar to my experience. BCB6, CodeGuard, about 24
threads, sending lots of small / large messages to eachother (24/7).
As metioned in my initial message, I've written a framework to simulate an
embedded environment to move a legacy real time embedded application to run
under Windows, which works great and has been smoother than I expected (so
far), apart from this frustrating issue.
Perhaps I should only use code guard for the small test harnesses and soak
tests, and when running the full application switch it off and use memproof
or something else. I'm also trying FastMM4, but unsure about its known
reliability and performance (in BCB6).
Is the latest IDE upgrade be better (I was confused as to if the problem you
had was BCB6 or BDS2006?
Paul
"Dennis Cote" <dennis.cote (AT) gmail (DOT) com> wrote in message
news:4630cc00 (AT) newsgroups (DOT) borland.com...
|
|
| Back to top |
|
 |
Dennis Cote Guest
|
Posted: Fri Apr 27, 2007 7:22 pm Post subject: Re: "Out Of Memory" Exception? |
|
|
Paul at NCF wrote:
| Quote: | Hi,
Yep this seems to be similar to my experience. BCB6, CodeGuard, about 24
threads, sending lots of small / large messages to eachother (24/7).
As metioned in my initial message, I've written a framework to simulate an
embedded environment to move a legacy real time embedded application to run
under Windows, which works great and has been smoother than I expected (so
far), apart from this frustrating issue.
Perhaps I should only use code guard for the small test harnesses and soak
tests, and when running the full application switch it off and use memproof
or something else. I'm also trying FastMM4, but unsure about its known
reliability and performance (in BCB6).
Is the latest IDE upgrade be better (I was confused as to if the problem you
had was BCB6 or BDS2006?
|
Paul,
I am having the problem with BDS 2006.
Clayton was having the problem with BCB6 but he thought the problem was
corrected in BDS 2006. I found that his test was working in BDS 2006
only because his threads were running to completion in one time slice,
i.e. they were all running sequentially, it was never switching between
active threads. By increasing the runtime of each thread, the problem
appeared in BDS 2006 as well.
I haven't found any solution short of disabling codeguard.
HTH
Dennis Cote |
|
| Back to top |
|
 |
Paul at NCF Guest
|
Posted: Fri Apr 27, 2007 8:56 pm Post subject: Re: "Out Of Memory" Exception? |
|
|
Thanks for your help.
| Quote: | I haven't found any solution short of disabling codeguard.
HTH
Dennis Cote |
|
|
| Back to top |
|
 |
Paul at NCF Guest
|
Posted: Sat May 05, 2007 1:24 am Post subject: Re: "Out Of Memory" Exception? |
|
|
Hi,
As expected, disabling CodeGuard stopped the problem.
Thanks for the help.
Paul |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|