For Programmers: Free Programming Magazines  


Home > Archive > VC Language > November 2005 > Re: Is there any function that I can use to check the current stack









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Is there any function that I can use to check the current stack
Gerard O'Brien

2005-11-28, 7:07 pm

Try this

MEMORY_BASIC_INFORMATION mbi;
LPBYTE pHere = (LPBYTE)&pHere;

::VirtualQuery(pHere, &mbi, sizeof mbi);

// mbi.AllocationBase is the numerically lowest address of the stack
// region, i.e., where it can grow down to.
return pHere - (LPBYTE)mbi.AllocationBase;


kimso.zhao@gmail.com wrote:
> Hi,
>
> I have a multi-thread program, and if I want to check the size of
> memory that has been allocated in the stack in one of the thread. Is
> there any fucntion avaiable in VC6.0?
>
> Thanks in advance!
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com