🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++.leda
Article #49

Re: LEDA's Memory management

#49
From: Frank Muzzulini
Date: Fri, 18 Aug 1995 16:36
17 lines
1284 bytes
P. Mantecon (pmanteco@haifa.cern.ch) wrote:
> I can  understand  the size of the basic chunk to be a power of 2, but
> what  puzzles me is that -4 bytes, so my  question  is the  following:
> why the chunk size is precisely 2^13-4 instead of being just 2^13?

malloc() always needs some additional bytes to store some information
about the allocated block. If you 'malloc' exactly 8k, it has to
allocate one block more, than needed to store 8k.
Seems to me, that's why they spare out the 4 bytes.

	Muzz

--
  ___  Frank Muzzulini     ua0y@rz.uni-karlsruhe.de     Muzz@irc
 <*,*>  ... until the colour of a man skin is of no more
 [`-']  significance than the colour of his eyes ...        Bob Marley (War)
 -"-"-
Technical Details
Message-ID: <412fhq$j98@nz12.rz.uni-karlsruhe.de>
Path: arc1-ca.pugleaf.net!rzstud1.rz.uni-karlsruhe.de!ua0y
References: <pmanteco.808736786@rscernix>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!rzstud1.rz.uni-karlsruhe.de!ua0y
From: ua0y@rzstud1.rz.uni-karlsruhe.de (Frank Muzzulini)
Newsgroups: comp.lang.c++.leda
Subject: Re: LEDA's Memory management
Date: 18 Aug 1995 16:36:10 GMT
Organization: University of Karlsruhe, Germany
Message-ID: <412fhq$j98@nz12.rz.uni-karlsruhe.de>
References: <pmanteco.808736786@rscernix>
NNTP-Posting-Host: rzstud1.rz.uni-karlsruhe.de
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-User: ua0y
X-Newsreader: TIN [version 1.2 PL2]