|
From: "Hall, Philip" <phall@spss.com> > > Can't speak for ALC/FRE, but when I wrote a similar tool for debug of ILE/C > programs to detect memory usage/leaks/etc., the C routines > malloc/calloc/realloc & free use a header* that is placed before the memory > allocated. This information contains the amount allocated. On calling free() Looking at the 16 bytes before the allocation, pos 1 always contains a X'AF', and pos 7 - 8 contains a value that increases by 16 or 32 for each allocation. ( I did 32 ALCHSS in a row and examined the 16 bytes before and after the alloc. ). -Steve
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.