Those damn uppity computers!

2007-11-20 Thread Earle Martin
http://www.slowwave.com/index.php?date=07-11-17 -- Earle Martin http://downlode.org/ http://purl.org/net/earlemartin/

Re: How NOT to write a shared library

2007-11-20 Thread Michael Poole
Nicholas Clark writes: > On Mon, Nov 19, 2007 at 06:01:17PM -0500, Michael Poole wrote: > >> Alternatively, the system allocator(s) is/are Too Damn Broken to work >> reliably in the various permutations of DLL Hell -- q.v. Windows -- >> and calling free() on a pointer that another DLL malloc()'ed

Re: How NOT to write a shared library

2007-11-20 Thread Nicholas Clark
On Mon, Nov 19, 2007 at 05:53:28PM -0500, Jarkko Hietaniemi wrote: > Also, wrapping the malloc is not *always* a bad thing to do: there are > mallocs out there that do things you wouldn't expect, e.g. if you try > to malloc() zero bytes. (Yes, there are legitimate reasons to do that.) C89 - we've

Re: How NOT to write a shared library

2007-11-20 Thread Nicholas Clark
On Mon, Nov 19, 2007 at 06:01:17PM -0500, Michael Poole wrote: > Alternatively, the system allocator(s) is/are Too Damn Broken to work > reliably in the various permutations of DLL Hell -- q.v. Windows -- > and calling free() on a pointer that another DLL malloc()'ed can crash > your application o

Re: How NOT to write a shared library

2007-11-20 Thread Peter da Silva
On 19-Nov-2007, at 16:50, Steff wrote: Perhaps I'm living in utter innocence here, but my desktop/laptop systems have a swap partition of fixed size. And they're set WAY too small, too, if it's windows. The old "2 times RAM" logic for swap files was never quite sane to begin with, and it's

Re: How NOT to write a shared library

2007-11-20 Thread Michael Poole
David King writes: > On-topic from : > > I'm interested in audio, so I'm looking over the (frankly horrible) > documentation for this new "Pulse Audio" thing, and I see this > function in its shared lib: > > pa_xmalloc() > Allocates the spec

Re: How NOT to write a shared library

2007-11-20 Thread Jarkko Hietaniemi
Also, wrapping the malloc is not *always* a bad thing to do: there are mallocs out there that do things you wouldn't expect, e.g. if you try to malloc() zero bytes. (Yes, there are legitimate reasons to do that.) Or you need to write your own memory management abstractions on top of malloc, like