mbenkmann / limux-gosa

GOsa² is a web based adminstration tool for user accounts, groups, servers, clients, and many other things.
18 stars 5 forks source link

Memory leak: SIGUSR2 (Hooks) #101

Closed mbenkmann closed 9 years ago

mbenkmann commented 9 years ago

From matthias...@gmail.com on March 25, 2013 07:00:43

Every time the package database is read in again we lose memory. Fix: Rewrite xml_hash.go to use malloc/free rather than GC'ed memory.

Original issue: http://code.google.com/p/go-susi/issues/detail?id=101

mbenkmann commented 9 years ago

From matthias...@gmail.com on March 24, 2013 23:58:26

=> Type Optimization

Labels: -Type-Feature Type-Optimization

mbenkmann commented 9 years ago

From matthias...@gmail.com on April 01, 2013 14:48:46

Fixed in 270ef0245c9c The idea of rewriting xml.Hash with malloc/free was discarded because there's too much existing code that would have to be changed to manually call free(). Instead xml.Hash was rewritten to keep text in small chunks in a linked list with specialized base64 decoding and encoding methods that can work chunk-based without constructing at any time the whole string. This fixes the big leaks related to the