MAD changes

Pavel Roskin proski at gnu.org
Fri Nov 2 20:05:34 UTC 2001


Hello, Andrew!

> I suggest this patch to incorporate into cvs.  Glib support enabled
> again now - sorry Pavel, but without it builtin editor fails on each
> search.  I write mad_get_current_dir to use instead of g_get_current_dir.
> Also mad_tempname now has file and line parameters.

No need to say sorry.  I disabled Glib support before 4.5.55 because MAD
didn't take care of some functions in Glib allocating memory (which was
especially bad for gmc).  If you can reimplement them all (fortunately
we don't care about gmc now), then it's fine to reenable Glib support.

Better yet, we could make Glib use malloc from MAD (sorry, I cannot
check right now whether it's possible).

Last time I checked, the editor was failing for a real reason - it used
Glib malloc() to allocate the memory and standard (i.e. libc) free() or
vice versa.  This is a real problem, and it should be fixed.  Glib is
not guaranteed to use the same memory pool as Libc.  In fact, I remember
seeing comments saying that it's the real issue on *BSD.

Of course, having Glib support is better than not having it, so please
go ahead with your patch, but please realize that the problem in the
editor is real.  The ChangeLog should be changed accordingly.

In order to simulate the worst case scenario, MAD should use two separate
pools for malloc() and g_malloc().  But it can be done later.

I'm still in process of moving home, but I hope to return to the normal
"work mode" by the end of the next week.  I'm sorry for increased
"latency" and lower "quality" of my replies in the meantime.

-- 
Regards,
Pavel Roskin



More information about the mc-devel mailing list