H
H.K. Kingston-Smith
Thanks to everybody who replied to my question on alignment on
stack arrays. In a similar vein, what can one say about the alignment of
p in
char *p = alloca(N) ;
where N can be any integer smaller than the stack space available? Is it
going to follow similar alignment patterns as malloc(N) or as char p[N]?
I am aware that using alloca() is not encouraged, but I have come across
a few situations in which it would advantageous to do so.
stack arrays. In a similar vein, what can one say about the alignment of
p in
char *p = alloca(N) ;
where N can be any integer smaller than the stack space available? Is it
going to follow similar alignment patterns as malloc(N) or as char p[N]?
I am aware that using alloca() is not encouraged, but I have come across
a few situations in which it would advantageous to do so.