Hi Sam, > some platforms have malloc implementations with extra features like > randomizations, and some applications cannot handle those features. > thus emacs (and clisp) come with gmalloc.c by Mike Haertel. > It would be nice if it were offered by gnulib
Generally one should use the malloc() from the system. It's better integrated with the rest of the system (for example, on Linux is uses the 'mremap' system call). The reasons for using GNU malloc depend on the system. I guess Emacs uses it on all platforms, because of 'unexec'. For clisp, the "makemake --help" says it's needed on HP-UX and OpenBSD. On HP-UX it is needed because otherwise clisp crashes; I could never really determine whether it is HP-UX malloc which is buggy or whether the reason is simply that gmalloc is more forgiving (it survives out-of-range memory writes more often). For OpenBSD, I don't know or remember the reasons. But in any case, address space randomization is something applications need to get friendly with, because it's not going away (given the flood of malware attacks out there). So, I don't see how to make a gnulib module out of it, that includes an autoconf macro that would be suitable for both Emacs and clisp. Bruno
