Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!sac90286 From: sac90286@uxa.cso.uiuc.edu Newsgroups: comp.lang.c Subject: TurboC malloc() question Message-ID: <227300004@uxa.cso.uiuc.edu> Date: 19 Sep 89 14:39:00 GMT Lines: 23 Nf-ID: #N:uxa.cso.uiuc.edu:227300004:000:1106 Nf-From: uxa.cso.uiuc.edu!sac90286 Sep 19 09:39:00 1989 Hello Netland! I'm trying to make use of some dynamic memory allocation debugging routines I found in Byte magazine (I don't remember exactly which issue, though). The code does some basic integrity checks of the free list at each call to malloc(), realloc() or free(). It relies on some "inside knowledge" of the way the memory allocation routines are implemented, specifically the structure of each node in the free list and the symbol pointing to the head of the free list. The symbol they give as the free list head pointer, _allocp, is apparently not the name Borland uses in their malloc implementation (at least under version 2.0). I poked around a bit and stumbled across a symbol called __first, but when I substituted that symbol for _allocp the memory check routines crashed immediately. Either my guess was wrong and __first isn't the pointer I need or the node structure given in the article is different from that used by TC. Can some kind soul provide me with the structure declaration as well as the name of the free list head pointer? I'd be most appreciative. Scott kubla@uiuc.edu