Article View: comp.lang.pascal.borland
Article #213Re: Heap Checking
From: Robert AH Prins
Date: Thu, 27 Jan 2000 00:00
Date: Thu, 27 Jan 2000 00:00
43 lines
2769 bytes
2769 bytes
In article <fjf.20000127014253@gnu.de>, frank@[NOSPAM.REMOVE.THIS]g-n-u.de wrote: > In <86mdcv$tp9$1@nnrp1.deja.com>, > Robert AH Prins <prinsra@williscorroon.com> wrote: > > > Note to the makers of (non-)commercial Pascal compilers > > (FreePascal/GNU Pascal & Virtual Pascal/TMT Pascal): Consider doing > > what IBM has done for years with its MF OSes, add user exits to your > > RTLs, an indirect far call, (defaulting to a far ret,) would be ever > > so useful, not only for debugging purposes, but also for profiling! > > (Consider making it available in a separate debugging/profiling RTL) > > I'm not completely sure what you mean here. I can imagine two things > which GNU Pascal both provides: > > - User-defined finalization code (as defined in the standard) which > can be used, e.g., to check for memory leaks at the end of the > program. In fact, we have a unit which does this (quite primitive > now, but can be extended)... Under a really good OS there should be no need for this. If the program runs in its own address space and terminates, the OS should clean up after it if the program doesn't do so itself! (Like MVS does!) > - Hooks into the heap allocation. There are variables (GetMemPtr > etc.) which are pointers to the low-level heap management > routines. A program can redirect them to its own routines. E.g., > to do some accounting and checking before/after calling the > original routines. Yes, yes, yes! That is exactly what I mean! Another example, just springing into mind, are TFDDs in TP/BP, I believe you've got one that takes over WRITELN to write to strings. Robert -- Robert AH Prins prinsra@willis.com Sent via Deja.com http://www.deja.com/ Before you buy.
Technical Details
Message-ID:
<86p14j$s8q$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<86js5u$29k$1@nnrp1.deja.com> <ffvq8ske8bdvifb7aifubpeqal23s32dt7@4ax.com> <86kemk$f1v$1@nnrp1.deja.com> <ialr8soi9f73me4559hjt24ocjg7son4gs@4ax.com> <86mdcv$tp9$1@nnrp1.deja.com> <fjf.20000127014253@gnu.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111659,6aa5a22c4c09a438 X-Google-Attributes: gid111659,public X-Google-Thread: 10261c,536f7e41ae9de935 X-Google-Attributes: gid10261c,public X-Google-Thread: 108ebd,b1ac468ba433a98d X-Google-Attributes: gid108ebd,public From: Robert AH Prins <prinsra@williscorroon.com> Subject: Re: Heap Checking Date: 2000/01/27 Message-ID: <86p14j$s8q$1@nnrp1.deja.com> X-Deja-AN: 578198149 References: <86js5u$29k$1@nnrp1.deja.com> <ffvq8ske8bdvifb7aifubpeqal23s32dt7@4ax.com> <86kemk$f1v$1@nnrp1.deja.com> <ialr8soi9f73me4559hjt24ocjg7son4gs@4ax.com> <86mdcv$tp9$1@nnrp1.deja.com> <fjf.20000127014253@gnu.de> X-Http-Proxy: 1.0 x31.deja.com:80 (Squid/1.1.22) for client 193.130.234.1 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Jan 27 08:54:45 2000 GMT X-MyDeja-Info: XMYDJUIDprino Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.misc,borland.public.turbopascal X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I)