ghashes



i see a problem in ghash.c. Mem is allocated from a global GMemChunk which
never shrinks.. say a preogram spawns 20threads that all create one hash
each. then ALOT of memory will be allocated and never freed.. a solution
could be to move the GMemChunk into the GHashTable stuct so that each hash
has it's own mempool.. this would enable g_hash_table_destroy() to free ALL
memory associated with a ghash so no memory leaks .. 

tell me if i'm wrong  / Chrisse




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]