[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [cdt-dev] Variable on stack or heap?
|
- From: Gavin Rehkemper <gavreh@xxxxxxxxx>
- Date: Fri, 6 Nov 2009 09:42:11 -0600
- Delivered-to: cdt-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:cc:content-type; bh=SC59fTlFH/gLl1KGyZz5TUY/7R3vECUJybWaClKaY5k=; b=GbckrSwqkLmApmuK80i1g4TN+RixX6R70f+w0M/lGb85MHR3OuwxkpTOd6+cU3Vjk2 QZ6XC0s/59Ysy1Ur134QNbmcfAOjBVV3ag30Lt1hldr35UBgArD91HHGF9y9+DCHPvCE 5mcYVmtE+zrpoQVau5ykQ1h3FynWHlmLxzsLk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; b=dy7TG6tMOxO6ZQ5X9qN25DBEUKLrTNqp/uJ52utnIVmSLnt85kV6BMVhGpW3iKpM2/ O2mAk2+lPgM/7uf4k0Pdqej4PCksLrky6pC35jVv8vwAPfOIVWmTwjXnFbo0VMinsktm kEVNgbCR6xdK3/CgwvPberXKdXcJ8QvQU2Gds=
We have a variable, and we know it is a pointer. How do we determine whether it points to something allocated on the heap (malloc'd, for example), or something allocated on the stack (an array of finite length).
Thanks for the help!
Gavin
Never herd of syntax to declare variable in C in the heap. What do you mean?
On Thu, Nov 5, 2009 at 7:18 PM, Gavin Rehkemper <
gavreh@xxxxxxxxx> wrote:
> Hi everyone,
>
> We are inspecting the AST in CDT. Is there any way to figure out if a
> particular variable was declared on the stack or on the heap? Any help on
> this topic would be appreciated.
>
> Thanks,
> Gavin