Re: [Jamvm-general] nativeStackBase() in os/linux/os.c not returning StackBase
Brought to you by:
rlougher
From: Robert L. <rob...@gm...> - 2016-02-29 16:56:18
|
Hi, This is due to the interpretation of what is the "base" of the stack. For JamVM, the base of the stack is where it starts from. As the stack grows down, this is the _highest_ address. However, pthread_attr_getstack returns the _lowest_ address as the base of the stack. To convert this into JamVMs interpretation the stack size needs to be added. Rob. On 29 February 2016 at 16:05, Frieder Berthold < ber...@go...> wrote: > Hey JamVM-Guys, > > i'm a bit confused by the implementation of the function nativeStackBase() > in os/linux/os.c > It uses pthread_attr_getstack(), which returns the actual stack base [1], > but then you add the size on this void* . So if this really is the > intention, could someone please explain the reason of this to me?:-) > > (The void* addition is the reason I stumbled over this, as only gnu allows > this, which I am not using) > > Greetings > Frieder > > > [1] > http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_attr_getstack.html > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 > _______________________________________________ > Jamvm-general mailing list > Jam...@li... > https://lists.sourceforge.net/lists/listinfo/jamvm-general > > |