[devel] [git update] packages/katrin: heads/master

Денис Смирнов mithraen на altlinux.ru
Вс Июн 24 15:50:58 MSD 2007


On Sat, Jun 23, 2007 at 08:42:24PM +0600, Andrey Rahmatullin wrote:
 AR> On Sat, Jun 23, 2007 at 06:40:46PM +0400, Денис Смирнов wrote:
>> Если использовать strdupa/asprintf то можно (и нужно) не освобождать. Ибо
>> память выделяется в стеке.
AR> А хренли в мане This pointer should be passed to free(3) ?

Извиняюсь что ввел в заблуждение по поводу asprintf.

А вот для strdupa:
strdupa()  and  strndupa()  are  similar,  but use alloca(3) to allocate
the buffer.  They are only available when using the GNU GCC suite, and
suffer from the same limitations described in alloca(3).

Ну а что alloca выделяет память на стеке (со всеми преимуществами и
недостатками этого подхода) факт общеизвестный.

-- 
С уважением, Денис

http://freesource.info
----------------------------------------------------------------------------
<drF_ckoff> воткнуть чтоль обратно /^unknown$/ 550 "V bobruysk!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.altlinux.org/pipermail/devel/attachments/20070624/cecbd350/attachment.bin 


Подробная информация о списке рассылки Devel