comp.lang.ada
 help / color / mirror / Atom feed
From: NKSW39B@prodigy.com (Matthew Givens)
Subject: Dynamic Allocation problem
Date: 1997/04/04
Date: 1997-04-04T00:00:00+00:00	[thread overview]
Message-ID: <5i436p$248c@newssvr01-int.news.prodigy.com> (raw)


Okay, I'm working on an Ada program that uses a LOT of dynamic allocation.


The program is supposed to retrieve records from an ORACLE database and 
load them into a Listbox (I'm running on a Sun).  It works fine for about 
1600 records, then croaks on an attempt to dynamically allocate the new 
memory.

The listbox data is stored (don't blame me, I didn't design it) in one 
large string, each row separated by LF's.  Only 100 rows at a time are 
actually displayed, but all rows are stored in the string.  Now, at the 
time of the crash, the listbox string takes up approx 300K, with the new 
row taking up 230 bytes.  When I try to allocate the new memory (using 
new), it dies with a STORAGE_ERROR exception.

Now, is there any way for me to check the amount of available storage 
BEFORE I actually try the allocation?  It would be helpful to me in 
debugging if I could tell how close to the memory limit I am at any given 
point, but I don't know how to do this.  Any help is appreciated.

-
"Outside of a dog, a book is a Man's best friend.  Inside of a dog it's 
very dark." << Iceman >>





             reply	other threads:[~1997-04-04  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-04-04  0:00 Matthew Givens [this message]
1997-04-05  0:00 ` Dynamic Allocation problem Robert A Duff
1997-04-05  0:00 ` Nick Roberts
replies disabled

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