I'm trying to port/debug some ugly Pascal code.

 

Is there a way I can tell if an arbitrary address is within the heap or
stack?

 

I want to do something like:

 

Assert(ValidHeapAddress(a))

Assert(ValidStackAddress(a))

 

to catch potential errors in the code.

 

I'm guessing any address between "end" and the current brk is a valid
heap address.

 

Thanks.

 

-- Bruce

CONFIDENTIALITY NOTICE: This e-mail is confidential and intended
solely for the use of the individual or entity to which it is addressed.  If
you are not the intended recipient, be advised that you have received 
this email in error and that any use, dissemination, forwarding, printing 
or copying of this e-mail is strictly prohibited. If you received this e-mail
in error, please delete it from your computer and contact the sender.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to