Opened 15 years ago

Closed 15 years ago

#311 closed bug (fixed)

drawing the flight lines increases main memory usage

Reported by: chrfi Owned by: emca
Priority: immediate Milestone:
Component: LAG Keywords: ram gui overflow caching
Cc: Other processors:

Description

to reproduce load several flight lines that will not fit within the given cache. these will load normally with the ram usage being capped at the cache limit. when the image is first drawn the amount of ram being used by the program will increase. This increase seems to be linked to the size of the flight lines. subsequent redraws increase the ram usage slightly but i think this is the same problem being caused by drawing areas that were in cache the first time but now have to be loaded.

once each part of the image has been drawn and loaded out of secondary memory once the increase stops. This at first seems to point to a problem in the caching code and therefore i have used my test bed to perform unit tests on the quadtree and caching classes. These tests showed that without the gui loading and then pulling points out of uncached buckets has no effect on the ram usage of the program.

so far the only theory is that it is caused by an overflow from the graphics card ram.

Change History (1)

comment:1 Changed 15 years ago by harg

  • Resolution set to fixed
  • Status changed from new to closed

FIXED. The problem was being caused by the interaction of the caching code with multiple threads or, more precisely, with the interaction of memory allocation by the kernel to the caching code, with it allocating memory separately for the original thread and any created threads. This has been fixed by replacing the standard mallocs, reallocs and frees with TCMalloc versions of the same. TCMalloc is a thread-safe memory allocation library.

Note: See TracTickets for help on using tickets.