On Sat, 06 Apr 2002 16:55:17 +0200, "Nils O. =?ISO-8859-1?Q?Sel=E5sdal?=" said: > The glibc malloc is also abit smarter, if you allocate large (enough) > chunks of memor in one go, it will use mmap to get that memory, mmap'ed > memory are afaik release back to the os when unmapped.. If I remember right, GTK runs on a lot of platforms that aren't glibc-based. Also, the mmap() trick only works for *single* requests that are big enough (at a minimum, greater than 1 page) - it can't help much for lots of little requests... In fact, it's pretty easy to show that being able to take the address of an malloc()d space and store it in a C variable implies that you cannot create a fragmentation-*proof* malloc(), since you can't make a workable relocating malloc. Of course, it's still possible to make a fragmentation-*resistant* malloc(). We now return you to your regularly scheduled discussion of timeouts and threads with GTK. ;) -- Valdis Kletnieks Computer Systems Senior Engineer Virginia Tech
Attachment:
pgpILo1Rw8NZF.pgp
Description: PGP signature