× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Steve,

> Anyone know about the structure of heap allocations?  ( ALCHSS )
> Is there "border" space before and after each allocation?
> When I FREHSS, how does the machine know size of the allocation.
> I am considering a debug tool that will examine the heap for

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()
the header is examined and then that amount is freed. I did not have to
concern myself with the original header placed there by the system, as in my
tool I also added an additional header that contained the information about
the program, where in the source it was allocated, etc. On completion of the
program the tool would report any memory still MIA, reuse of already freed
memory, etc.

--phil

[*]header: there are different ways that memory allocation routines 'tag'
the memory allocated on different operating systems; headers, pools,
lookups, bags, etc. As I did not need the information, I wasn't concerned
with how OS/400 implemented it for the ILE/C runtime.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.