Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Linux GlCtrl leaks problem fixed, new leaks related functions
Linux GlCtrl leaks problem fixed, new leaks related functions [message #57819] Sun, 19 December 2021 15:01 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
This was problem that was hunting us for years: With Linux radeon driver we got memory leaks warning no matter what we have tried.

Today I have finally found out why:

The problem is that those static leaks are allocated in different thread, so our attempts to ignore them using MemoryIgnoreLeaksBlock are not enough.

I have solved problem by adding

static bool Thread::IsUpp()

Calling thread was started using U++ Thread class (for main thread returns false).

void MemoryIgnoreNonMainLeaks()

Makes leaks detector ignore leaks by global constructors.

void MemoryIgnoreNonUppThreadsLeaks()

Makes leaks dectector ignore leaks created by threads that are not launched by U++ Thread class.

These get called from GLCtrl finally initialisation fixing the problem...

Another new function that can help to figure out leaks when leak breakpoints are not usable:

dword MemoryGetCurrentSerial()

In debug mode, returns the serial number of the next allocated block. This number is eventually listed in the log in case there are any leaks.

Returns the serial of NEXT block to be allocated. The idea is to find the leak using bisection (horribly tedious, but probably the option sometimes).
Re: Linux GlCtrl leaks problem fixed, new leaks related functions [message #57939 is a reply to message #57819] Thu, 30 December 2021 02:13 Go to previous message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Mirek,

Finally! Good job!

Klugier


U++ - one framework to rule them all.
Previous Topic: ide: Reformat JSON / XML
Next Topic: 32 bit wchar merged
Goto Forum:
  


Current Time: Thu Mar 28 22:31:39 CET 2024

Total time taken to generate the page: 0.01335 seconds