Article View: comp.lang.c++.leda
Article #50Re: LEDA's Memory management
From: Heribert Dahms
Date: Fri, 18 Aug 1995 20:25
Date: Fri, 18 Aug 1995 20:25
22 lines
1818 bytes
1818 bytes
In <412fhq$j98@nz12.rz.uni-karlsruhe.de> ua0y@rzstud1.rz.uni-karlsruhe.de (Frank Muzzulini) writes: : 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. If I remember right, this space is for some sort of next pointer from LEDA, not malloc(), and we had to hack around to increase this from 4 to 8, because OSF/1 on DEC Alpha uses 64bit pointers. BTW, <8Kb for data structures is a severe limit nowadays; that's not a PDP11. (Now I prefer Tcl/Tk, where I can easily have a single string of several Megabytes... (If someone doesn't now what Tcl/Tk is, see the comp.lang.tcl FAQ)) Bye, Heribert (dahms@ifk20.mach.uni-karlsruhe.de)
Technical Details
Message-ID:
<412suu$l97@nz12.rz.uni-karlsruhe.de>Path:
arc1-ca.pugleaf.net!rz.uni-karlsruhe.de!not-for-mailReferences:
<pmanteco.808736786@rscernix> <412fhq$j98@nz12.rz.uni-karlsruhe.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!rz.uni-karlsruhe.de!not-for-mail From: DAHMS@ifk20.mach.uni-karlsruhe.de (Heribert Dahms) Newsgroups: comp.lang.c++.leda Subject: Re: LEDA's Memory management Date: 18 Aug 1995 20:25:02 GMT Organization: University of Karlsruhe, Germany (Dept. of Mechanical Engineering) Distribution: world Message-ID: <412suu$l97@nz12.rz.uni-karlsruhe.de> References: <pmanteco.808736786@rscernix> <412fhq$j98@nz12.rz.uni-karlsruhe.de> NNTP-Posting-Host: ifk29.mach.uni-karlsruhe.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-News-Reader: VMS NEWS v1.25 In-Reply-To: ua0y@rzstud1.rz.uni-karlsruhe.de's message of 18 Aug 1995 16:36:10 GMT