Re: [Vala] array memory leak?



On Fri, 2014-03-07 at 12:49 +0100, Ulink wrote:
glibc does not and cannot immediately return every freed block back to
the system. Some blocks cannot be freed because they are just gaps
between heap-allocated regions and some blocks are intentionally not
freed to speed up following allocations.

Damn! My background is embedded programming and I'm relatively new to
Vala/GLib so I thought "g_free" is only an other name or a very thin
wrapper for "free".
I really think this is the solution.

'g_free' _is_ (normally) just a wrapper for 'free'. Please note that I'm
talking about glibc, not GLib.

There is also a memory allocator in GLib, GSlice, which can have its own
share of internal fragmentation. However, that's not used for plain
strings and arrays.

Regards,
Jürg



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