[GRASS-dev] v.in.ogr eats all memory

Stephan Holl holl at gdf-hannover.de
Fri Jun 9 08:48:31 EDT 2006


Hello developers,

On Fri, 19 May 2006 16:20:47 +0100 Glynn Clements
<glynn at gclements.plus.com> wrote:

> 
> Hamish wrote:
> 
> > > Question: Can we add some test to avoid that more
> > > than xx percent of the memory are used? There won't
> > > be any hot plugin of extra RAM, so v.in.ogr should
> > > exit with memory allocation error.
> > 
> > attempt G_malloc(),G_free() of estimated size before processing.
> 
> That won't necessarily help.
> 
> The underlying brk/sbrk (or mmap(MAP_ANONYMOUS)) call will succeed so
> long as there is sufficient virtual memory and you don't exceed any
> usage limits which are in force.
> 
> That doesn't mean that reading/writing the allocated memory won't
> cause the system to go into a swapping frenzy.
> 
> > Back in
> > the mailing list archives somewhere I figured out the current bytes
> > per vector point needed (with valgrind) and suggested this?
> > 
> > I don't know how to query available memory in a cross platform way.
> 
> The "free" command will give you some global memory statistics. 
> However, that information is practically meaningless to an
> application, as there is no way to figure out how much of that memory
> you can reasonably expect to use.
> 
> On a lightly-loaded system, the application can expect to be able to
> use all of the memory which is currently being used by the buffer
> cache (which is usually most of the total memory). On a heavily-loaded
> system, it may only be able to use a small fraction of it.
> 

To keep this problem in mind I have added a bug in bugtracker[1]
so that we do not forget it.

If anybody feels responsible to fix this anoying problem, please go
ahead :-)

It seems that building topology needs lot of memory though.

Best regards

	Stephan

[1] https://intevation.de/rt/webrt?display=History&serial_num=4564

-- 
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office      -     Mengendamm 16d      -     D-30177 Hannover
Internet: www.gdf-hannover.de      -      Email: holl at gdf-hannover.de
Phone : ++49-(0)511.39088507       -        Fax: ++49-(0)511.39088508




More information about the grass-dev mailing list