www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/11/04:33:42

Date: Sun, 11 Aug 1996 11:28:59 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Gurunandan R Bhat <grbhat AT unigoa DOT ernet DOT in>
Cc: djgpp AT delorie DOT com
Subject: Re: is it true that....
In-Reply-To: <Pine.LNX.3.91.960710194142.991B-100000@aditya.unigoa.ernet.in>
Message-Id: <Pine.SUN.3.91.960811112724.24678W-100000@is>
Mime-Version: 1.0

On Wed, 10 Jul 1996, Gurunandan R Bhat wrote:

> 	i just saw it mentioned that malloc allocs in chunks of powers of 
> 2. for example malloc(1025) will alloc actually 2048. could someone 
> suggest ways to avoid this waste (in case it is true..)

Sure: write your own `malloc'.  The current implementation is optimized  
for speed, not for efficient use of available memory.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019