Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: brk/sbrk protos



> Heyla rc, can you take the brk and sbrk protos out of mem.c and
>  have configure work them out.

I'm not sure how we could do this in a robust fashion.
Each system keeps these prototypes hidden in a different place.
About the only thing I could do is grep in a few places for the
caddr_t type and use that if I find it.  Since these prototypes
are only used if you define ZSH_MEM, I not sure if we would
gain anything by this.  In general, it appears to be better to
use your systems malloc unless you are trying to debug memory
allocation problems.

Actually this reminds me of a couple of things I've been
wanting to do to mem.c.  I would like to separate mem.c into two
parts.  I would put the code for zsh's version of malloc/free/
etc... into its own file zmalloc.c (or whatever) and keep the
parts that zsh always uses (heap allocation, ...)  in mem.c

My rationale for this is that we could then experiment with using
alternate implementations of malloc such as GNU malloc or BSD
malloc.  Since the GNU malloc is GPL'ed, we couldn't include it
in the zsh distribution, but you could always download it yourself
and use it.

Just a random thought.

rc



Messages sorted by: Reverse Date, Date, Thread, Author