Michael

Here's some extra info to go with Phil Waight's report of a memory leak in
MapInfo Pro that he attributed to the INSERT statement.

I too encountered a memory leak problem with MapInfo Pro 6.0 last year.  I
was attempting to use MapBasic to create a Mapinfo table of 16M rows (4000 x
4000 1 km square cells) for use in a large-scale thematic map.
The logic was simply to execute CREATE REGION and INSERT statements in a big
loop.
My app crashed on Windows/NT 4 after about 10 minutes with an "out of
memory" diagnostic.

To identify the point of failure I commented out my INSERT statement and the
problem persisted!

I then commented out the CREATE REGION statement and re-enabled the INSERT
statement and my program terminated normally.

The code was like this:

   global gobjCell as object
   ...
   create region into variable gobjCell 1
      (x1,y1) (x2,y1) (x2,y2) (x1,y2) Center(x,y)

Evidently, on each iteration, the CREATE REGION statement failed to release
the memory block currently allocated  to hold the value of the variable
gobjCell before allocating another block.

This problem is still present with MapInfo Pro 6.5 (initial release) and
MapInfo Pro 6.5 Build 31 (the latest patch).

Fortunately THIS MEMORY LEAK PROBLEM DOES NOT EXIST WITH MAPINFO PRO 5.5
which I still keep alive for apps like this.

Regards

David M Haycraft
Information Analysis Associates  Pty Ltd
ABN 47 085 516 105
1 Cumming Place, Wanniassa, 2903
Aust Capital Territory,  Australia
Phone/Fax:  61 + 2 + 6231 8104
Mobile: 0412 001 134
Email:  [EMAIL PROTECTED]
Web :  www.acslink.aone.net.au/actaa/iaa.htm
A MapInfo Technology Partner


----- Original Message -----
From: "Taylor, Michael Graham" <[EMAIL PROTECTED]>
To: "Philip Waight" <[EMAIL PROTECTED]>
Cc: "Mapinfo List" <[EMAIL PROTECTED]>
Sent: Friday, 11 January 2002 13:13
Subject: Re: MI-L MI 6.5 Leaky? - YES on particular hw/OS


>
> Originally I thought the problem was with objects and/or aliases,
> however before I sent in the first posting I though I better do a bit
> more investigation, hence the small dataset and very simple code.  It
> was then that I determined that the FETCH and INSERT commands were both
> causing leaks on my system.
> Unfortunately what I want to do is a lot more complex on a damn site
> more data.  My computer will run out of memory way before it gets part
> way through it.  Now I am is the position of having to change the
> software platform which I do this in.  Looks like ARCINFO is going to
> win this round.
>
>
> > Philip Waight wrote:
> >
> > In July last year I logged a problem with MI Support re a memory leak
> > in 6.5 that had persisted from 6.0. The problem is caused by an INSERT
> > statement issued from the MI, MapBasic window or a MapBasic program.
> > The INSERT leaks memory at about 210 bytes per call (consistent with
> > your loop).
> >
> > Problem is that if you are doing large volume of inserts it is a
> > nuisance. If v. large then you get virtual memory out messages. Others
> > have noted the same problem during last year. Is not fixed by closing
> > tables, or restarting application. Quit MI and mem is recovered.
> >
> > I sent MI support a test program but they were unable to reproduce on
> > their environment. Mine is a Dell, PII, 333Mhz,128Mb notebook with
> > NT 4.0 sp 6a. Have run on a Win98 system without the same problem.
> >
> > I thought that the latest MI patch (6.5.0.3100 ) might have fixed in
> > spite of the elusive language in  the "maintenance read me" ...
> > "17865 A memory issue arose when running certain MapBasic programs
> > that contained specific coding scenarios. This has been corrected."
> > Have to be grateful for some information!
> >
> > Have just retested the patched version and the problem is not
> > resolved. I suppose it is reasonable that a problem of this sort can
> > be hardware/OS induced, but considering it was not there in 5.5 but
> > was in 6involves 1 statement, you'd think it could be fixed.
> >
> > My solution is to keep the last most reliable version for those heavy
> > number crunching jobs (I keep 5.5), or run on a PC which doesnt show
> > the problem.
> > Hate to think of the amount of time spent on this in isolating a line
> > of code in an application - you always suspect dodgy programming first
> > of course.
> >
> > Phil.
> >
> > ----- Original Message -----
> > From: "Taylor, Michael Graham" <[EMAIL PROTECTED]>
> > To: "Mapinfo List" <[EMAIL PROTECTED]>
> > Sent: Thursday, January 10, 2002 10:42 AM
> > Subject: MI-L MI 6.5 Leaky?
> >
> > > Hi
> > >
> > > Recently I've noticed that MI 6.5 (NT) appears to leak memory when
> > > certain mapbasic routines are run.  I've finally got around to
> > having a
> > > bit of a look at it and this i what I have found.  The following
> > program
> > > causes my memory usage to go from
> > > 118892 to 125464
> > > This is not released once the program has finished but is released
> > when
> > > MI is exitted.
> > > The table is approx 33000 polygons
> > >
> > > fetch first from parcel
> > > do until EOT(parcel)
> > > fetch next from parcel
> > > loop
> > >
> > > Adding in a create and insert command as follows caused twice the
> > leak
> > >
> > > create table myTemp (id integer)
> > > fetch first from parcel
> > > do until EOT(parcel)
> > > fetch next from parcel
> > > insert into mytemp (id) values (1)
> > > loop
> > >
> > > I am running MI6.5 on a Dell Precision 220 NT4.5
> > > Is this something to do with my system or are others able to
> > duplicate
> > > it?
> > >
> > > --
> > > Mike Taylor
> > > ______________________________________________
> > > GIS Senior Consultant                   mailto:[EMAIL PROTECTED]
> > > Sinclair Knight Merz Limited            http:\\www.skmconsulting.com
> >
> > > Level 12, Mayfair House                 Tel: +64 4 473 4265
> > > 54 The Terrace                          Fax: +64 4 473 3369
> > > PO Box 10283,Wellington
> > > New Zealand
> > >
> > >
> > >
> > >
> > _______________________________________________________________________
> > > List hosting provided by Directions Magazine | www.directionsmag.com
> > |
> > > To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> > > put "unsubscribe MapInfo-L" in the message body.
>
> --
> Mike Taylor
> ______________________________________________
> GIS Senior Consultant                   mailto:[EMAIL PROTECTED]
> Sinclair Knight Merz Limited            http:\\www.skmconsulting.com
> Level 12, Mayfair House                 Tel: +64 4 473 4265
> 54 The Terrace                          Fax: +64 4 473 3369
> PO Box 10283,Wellington
> New Zealand
>
>
>
> _______________________________________________________________________
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to