[ProgClub list] Memory management in C

John Elliot jj5 at progclub.org
Sun Oct 2 05:28:21 AEDT 2011

On 2/10/2011 5:09 AM, Asher Glynn wrote:
> It depends on the language - if you have a high level one, forget it, you
> are doing whatever it says. In C and Pascal you modify it through compiler
> directives. Say in Windows, every API has a PASCAL macro telling it to pass
> according to the Pascal calling convention, you include the header file and
> it tells the compiler what to do. In Pascal I can't remember exactly what it
> was.

You'd think I'd find something useful, but no:



It seems to me like the calling convention is completely out of the 
developer's hands.

I found this:


Which I don't entirely understand. It seems to be saying that the first 
four parameters are passed in particular registers (depending on their 
size and type). Does this mean 'always'? Do all compilers have to know 
about this and generate code accordingly?

Maybe this will help:


Reading now...

More information about the list mailing list