I want to know how a stack based object calls methods of a class. What happens internally in memory and where does it save the address and name of the functions and how it maps it and call the exact method?
Asked
Active
Viewed 82 times
0
-
Refer: http://stackoverflow.com/questions/14724390/memory-allocation-for-objects – Atul Feb 24 '16 at 04:23
-
This is implementation depended. Different compilers (or even compiler versions) may solve this problem using unsimilar approaches. See this article for an example: http://www.openrce.org/articles/files/jangrayhood.pdf – Ari0nhh Feb 24 '16 at 04:29
-
'Stack based object' is mostly irrelevant. Non-virtual methods are called directly and resolved at link time. Virtual methods are called via a virtual function table or similar. The compiler may life that if it is confident the object is of the declared type, and 'stack based' is one such situation. – user207421 Feb 24 '16 at 05:32
1 Answers
-1
http://www.tenouk.com/Bufferoverflowc/Bufferoverflow2a.html.
please check this link for details of how function call was performed,Hope this will help you.

Rohit Hajare
- 125
- 1
- 7