Oh and for querying stack pointers, there should be an OS function
somewhere to give you the base stack pointer address and available
stack size, though I don't know the names of functions off the top of
my head.
___
fpc-pascal maillist - fpc-pascal@lis
On Tue, Dec 1, 2009 at 11:58 AM, Bruce Bauman
wrote:
> 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?
Without hooking/replacing the memory manager, I don't believe you can
handle memory tracking this information
On 01 Dec 2009, at 17:58, Bruce Bauman wrote:
> 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))
That is not possible without installing your own memory manager that tracks all
allocations. Also k
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 b