🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by "Karl Berry." Thu, 24 Aug 1989 17:48
malloc and powers of 2
#376
Author: "Karl Berry."
Date: Thu, 24 Aug 1989 17:48
18 lines
1051 bytes
I was doing some large Fourier transforms; in particular, the array I
was allocating was 4MB. I was using GNU malloc, and I noticed that right
after the call, the amount of memory being used was 8MB more, not 4! 
That is very bad.

After looking through the code, it appeared that the reason was simply
that the overhead involved made it want to allocate one more unit, i.e.,
twice as much memory. 

Even if that's not the reason, better behavior is still needed -- 4MB+1K
I could accept.

By ``GNU malloc'' I mean the malloc.c distributed with emacs (18.54).

I read in the latest bulletin that Mike Haertel was working on a new
malloc...

karl@umb.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads