[Liblas-devel] Cached Reader bottleneck

Mateusz Loskot mateusz at loskot.net
Thu Oct 21 06:54:06 EDT 2010


On 21/10/10 04:39, Gary Huber wrote:
> Mat,
>
> I got your change and it works to initialize a Reader but on a later
> Reader::Reset() call it runs out of memory. Should it be creating a
> new array on Reset?

In theory, it should not, but I'm not sure what is the context of
resetting the reader. I will have to learn about it.

> At the line cache_mask_type(hptr->GetPointRecordsCount(),
> uncached_mask).swap(m_mask); it throws a std::bad_alloc exception.

This seems to confirm heap fragmentation issue.
Large'ish array exists, reallocation of larger one fails due to lack of
continuous block of requested size.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org


More information about the Liblas-devel mailing list