🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #2332

Re: malloc and allocation errors

#2332
From: Ozan S. Yigit
Date: Tue, 18 Jan 1994 20:09
34 lines
2337 bytes
Alan W Black writes:

   Is there a GNU (or at least freely redistributable) version of malloc
   which at least keeps track of allocated and freed segments (similar to
   what SunOS's /usr/lib/debug/malloc.o does).

take a look at the moraes allocator, ftp-able from cs.toronto.edu as
pub/moraes/malloc.tar.gz. it is one of the nicest mallocs [of course
i am biased] one can find, and you will be able to read the code too.
it comes with the usual uoft [cnews-style] copyright.

from its README:

        The allocator is small, fast and space-efficient.

        It performs coalescing on frees.

        It has hooks for profiling, tracing and memory leak detection.

        It has very comprehensive and paranoid errorchecking as a compile
        time option, enough to detect most forms of heap corruption.

        Optionally, it attempts to be compatible with the proposed
        ANSI C Standard definition for the standard library functions
        malloc(), calloc(), realloc() and free(). By default, it is more
        or less compatible with existing Unix malloc() functions - some
        differences do exist. [Notably free(), cfree() returning void,
        realloc() not accepting a freed block]


hope this helps...	oz
---
If you can't understand it, you         |  electric: oz@sis.yorku.ca
certainly can't trust it. - D. McIlroy  |  or [416] 736 2100 x 33976
Technical Details
Message-ID: <OZ.94Jan18150957@ursa.sis.yorku.ca>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!howland.reston.ans.net!cs.utexas.edu!utnut!torn!newshub.ccs.yorku.ca!oz
References: <AWB.94Jan18111511@as53.itl.atr.co.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,82aeb50e0bd65249
X-Google-Attributes: gid11318c,public
X-Google-Thread: 1025b4,82aeb50e0bd65249
X-Google-Attributes: gid1025b4,public
X-Google-Thread: 106b4a,7780ae9facc4121d,start
X-Google-Attributes: gid106b4a,public
X-Google-ArrivalTime: 1994-01-18 12:56:06 PST
Newsgroups: gnu.misc.discuss,gnu.gcc.help,comp.sources.d
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!darwin.sura.net!howland.reston.ans.net!cs.utexas.edu!utnut!torn!newshub.ccs.yorku.ca!oz
From: oz@ursa.sis.yorku.ca (Ozan S. Yigit)
Subject: Re: malloc and allocation errors
In-Reply-To: awb@itl.atr.co.jp's message of Tue, 18 Jan 1994 02:15:11 GMT
Message-ID: <OZ.94Jan18150957@ursa.sis.yorku.ca>
Sender: news@newshub.ccs.yorku.ca (USENET News System)
Organization: The Electric Skillet
References: <AWB.94Jan18111511@as53.itl.atr.co.jp>
Date: Tue, 18 Jan 1994 20:09:57 GMT
Lines: 42