# malloc() vs. mymalloc()

Pavel Curtis (pavel@parc.xerox.com)
Mon, 1 Apr 1996 10:46:46 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    Christopher Unkel writes:
    > Is there a reason that timers.c and regexp.c call malloc() and free()
    > directly, instead of calling mymalloc() and myfree()?  pattern.c uses
    > mymalloc() but can't seem to decide between free() or myfree()...

    The timers module is almost completely separable from the rest of the server,
    so I used malloc() to keep it so, in case I (or anyone else) wanted to use it
    again in some other context.

    In pattern.c, I use myfree() for anything allocated by mymalloc() and free()
    for anything allocated by the (externally developed) regexp package, which uses
    malloc() to allocate things.

    	Pavel