On 2005-06-30 22:27, Roman Kurakin <[EMAIL PROTECTED]> wrote: >Dmitry Mityugov wrote: >>On 6/30/05, Roman Kurakin <[EMAIL PROTECTED]> wrote: >>> One simple question on programming style. Is it ok to call malloc >>> while we releasing some object? >> >> Are you releasing it in another thread? Is it a C++ object? How are >> you releasing it? > > This was general question. In fact I've found that ttyfree() function > from kernel code allocates tempory variables to free tty. I didn't > expect such behaviour. I always thought that deallocation of smth > should need other alloc.
Not necessarily. This could be a problem if you are implementing the allocator itself, and start an infinite recursion or end up deadlocking against the allocator which waits the allocator to finish, which waits the allocator... etc. Users of a general purpose memory allocator don't generally have to worry about the same thing though ;-) _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

