comp.lang.ada
 help / color / mirror / Atom feed
From: prichtmyer@yahoo.com (Peter Richtmyer)
Subject: Re: Program Terminates ...
Date: 30 Dec 2003 07:30:00 -0800
Date: 2003-12-30T07:30:00-08:00	[thread overview]
Message-ID: <1b585154.0312300730.459483cc@posting.google.com> (raw)
In-Reply-To: 1b585154.0312211634.6c414d2e@posting.google.com

prichtmyer@yahoo.com (Peter Richtmyer) wrote in message news:<1b585154.0312211634.6c414d2e@posting.google.com>...

> Is there some resource that could be used up and yet not cause
> an exception? 

I don't like to point fingers when not absolutely certain, but 
it seems like Gnat may not be re-using memory from Unbounded_String's
that as their lengths change.


Below is part of gnatmem output:
----------------- snip ---------------
E:\>gnatmem -o temp2.out ut_wc_client.exe
y
gdb-internal-error: virtual memory exhausted: can't allocate 144
bytes.
C:\GNAT\bin\gdb.exe: *** mount version mismatch detected -
0x1A010A68/0x1B.
You have multiple copies of cygwin1.dll on your system.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version
*should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.
     24 [main] gdb 5240 sync_with_child: child 3348(0x230) died before
initialization with status code 0x1
    587 [main] gdb 5240 sync_with_child: *** child state waiting for
longjmp
  53862 [main] gdb 5240 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
  79130 [main] gdb 5240 open_stackdumpfile: Dumping stack trace to
gdb.exe.stackdump

### incorrect user program  termination detected.
    following data may not be meaningful

Global information
------------------
   Total number of allocations        :1666861
   Total number of deallocations      :   0
   Final Water Mark (non freed mem)   : 298.08 Megabytes
   High Water Mark                    : 298.08 Megabytes

Releasing deallocated memory at :
--------------------------------
   : ada__strings__unbounded__finalize$2

   : ada__strings__unbounded

   : system__file_io__close

   : ada__text_io__afcb_free$2

   ./UTT/lan_common/pragmarc.skip_list_unbounded.2.ada:183ut_macro_pkg.vardb_o.vardb_pkg.delete

Allocation Root # 1
-------------------
 Number of non freed allocations    :1415127
 Final Water Mark (non freed mem)   :  81.81 Megabytes
 High Water Mark                    :  81.81 Megabytes
 Backtrace                          :
   : ada__strings__unbounded__adjust$2

Allocation Root # 2
-------------------
 Number of non freed allocations    :159053
 Final Water Mark (non freed mem)   :   9.34 Megabytes
 High Water Mark                    :   9.34 Megabytes
 Backtrace                          :
   : ada__strings__unbounded__to_unbounded_string

Allocation Root # 3
-------------------
 Number of non freed allocations    :77215
 Final Water Mark (non freed mem)   : 149.88 Megabytes
 High Water Mark                    : 149.88 Megabytes
 Backtrace                          :
   : ada__strings__unbounded__append$2

Allocation Root # 4
-------------------
 Number of non freed allocations    :13393
 Final Water Mark (non freed mem)   :  54.49 Megabytes
 High Water Mark                    :  54.49 Megabytes
 Backtrace                          :
   : ada__strings__unbounded__replace_slice$2

--------------------- end snip -------------------

I started replacing Unbounded_strings and it seems to help.
Bu tthere are alot more.

The RM says:

   "Implementation Requirements 

   No storage associated with an Unbounded_String object shall 
   be lost upon assignment or scope exit. "

I seem to be losing storage though. And
is it OK to lose storage when the string changes length?
Would like to hear what folks know about this.

Thanks,
Peter



  parent reply	other threads:[~2003-12-30 15:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-22  0:34 Program Terminates Peter Richtmyer
2003-12-22 14:37 ` Steve
2003-12-22 18:02   ` Georg Bauhaus
2003-12-23 11:16     ` Martin Krischik
2003-12-22 20:55   ` Randy Brukardt
2003-12-22 23:01   ` Stephen Leake
2003-12-22 23:03 ` Stephen Leake
2003-12-30 15:30 ` Peter Richtmyer [this message]
2003-12-30 16:07   ` Jeff C,
2003-12-30 22:31     ` Peter Richtmyer
2003-12-30 23:06       ` Jeff C,
2003-12-31 14:42         ` Peter Richtmyer
2003-12-31 15:52         ` Robert I. Eachus
2003-12-31  8:24       ` Simon Wright
2003-12-31 14:55     ` Frank J. Lhota
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox