Re: [linux-audio-dev] malloc() in RT code considered not-so-harmful?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] malloc() in RT code considered not-so-harmful?
From: Tim Hockin (thockin_AT_hockin.org)
Date: Tue Jul 13 2004 - 20:59:39 EEST


On Tue, Jul 13, 2004 at 10:21:23AM -0700, Joshua Haberman wrote:
> You could use a lock-free malloc as an emergency memory store for when
> your pre-allocated buffers run out.

There's no such thing as a lock free malloc() that calls brk(), unless I
am confused. brk() is a syscall that can block the caller.

To make a lock-free malloc(), you have to malloc() a big chunk of memory,
then run your own allocator against it. You don't reduce your overhead at
all.

Or am I confused? Allocators never were my focus.. :)


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jul 13 2004 - 21:03:16 EEST