خرید بک لینک

Vote count: 0

I am currently using a routine String_concat(char *str1, char *str2) which, as its name suggest, concatenates two strings. To do so, this routine dynamically allocates memory on the heap (via malloc()). However, since the returned string is only used in the calling routine, I am thinking of directly allocating memory on the stack (via alloca()), hence I would replace String_concat() with something like String_concat2(char* str1, char* str2, char* dest) which would take the destination buffer (already allocated on the stack) as an argument. So my question is : Is is ok for String_concat2() to write in the stack of its calling routine, or must I force inlining via __attribute__((always_inline)) ?

asked 15 secs ago

برچسب: is it safe,is it safe to travel to greece,is it safe to travel to paris,is it safe to travel to israel,is it safe to travel to mexico,is it safe to travel to europe,is it safe to eat raw eggs,is it safe to travel to turkey,is it safe to travel to puerto rico,is it safe to eat chipotle, نویسنده: استخدام کار تاريخ: سه شنبه 19 مرداد 1395 ساعت: 19:47

صفحه بندی