[cfe-dev] increase size of function pointer?

John McCall rjmccall at apple.com
Wed Jun 1 14:55:35 PDT 2011


On Jun 1, 2011, at 12:48 PM, ret val wrote:
> I would like to be able to increase the size allocated for normal function pointers so they each fill a entire (virtual memory) page.

Do you mean that you want each *function* to occupy its own
VM page, or do you really mean that you want function *pointers*
to grow from 4-8 bytes apiece to 4KB?

The best way of doing the former is to specify a huge alignment for
the function.  The latter is likely to break a lot of code that assumes
(yes, technically contrary to the standards) that function pointers
can be losslessly cast to, say, void*.

John.



More information about the cfe-dev mailing list