× 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.



This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Some notes on using the heap instructions.

The instructions CRTHS, DESHS, ALCHSS and FREHSS perform very well and are 
completely bug free.

Use MATHSAT after your module or pgm has freed all its allocations. This is a 
good way to chk that you really are freeing all that has been allocated.

Allocating from your own CRTHS heap instead of the default heap is a good idea. 
This way the harm done by coding errors which overwrite an allocation can be 
limited to the code in question. This also will enable MATHSAT as described 
above to be useful.

The heap space mark functionality should be ignored. There is a bit of 
documentation on marks, so there must be a good reason for them.  Maybe marks 
are used to implement a function call stack. But I dont think there is much use 
for it.

There are 2 heap instructions not provided by MI.
TSTHSS - test that an allocation has been freed.
MATHSSAT - materialize the size of an allocation.
Both can be implemented using MATHSAT, but that would run too slow for 
production work.  The machine has this info available since it uses it when you 
FREHSS,  so these instructions could be easily provided.

It is best if you over allocate your allocations by 16 bytes or so. Use this 
space in front of the allocation to store the size of the allocation and maybe 
the name of the module that did the allocation. This helps to identify the 
source of allocations which have not been freed.  It also helps when trying to 
trap bugs which overwrite their allocations.

Steve Richter



--



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.