From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,de8f33acc05f1b39,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-02-25 20:17:52 PST Path: gmd.de!newsserver.jvnc.net!netnews.upenn.edu!msuinfo!agate!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!nntp-server.caltech.edu!quixote.gps.caltech.edu!sancho From: sancho@quixote.gps.caltech.edu (Ignotum per ignotius) Newsgroups: comp.unix.osf.osf1 Subject: strange malloc -- fragmentation ? Date: 23 Feb 1994 04:22:05 GMT Organization: Caltech Distribution: world Message-ID: <2kelld$snu@gap.cco.caltech.edu> Reply-To: sancho@quixote.gps.caltech.edu (Ignotum per ignotius) NNTP-Posting-Host: quixote.gps.caltech.edu DEC ALPHA 3000/400 OSF1.3(a) I wonder if anyone can clear up a point I that has been bothering me. I am allocating memory to a large number of arrays. I know the maximum size of each array in advance & previously used this to malloc some space in advance. To save space I then decided to calculate the true size, and allocate only what's needed. This ought to give a 50% saving but actually falls well short of this. I guage this by the RSS increase after the malloc's and by the maximum size of the process I can run on the machine. That IBM RS6000 I just experimented with has no such difficulties ! What's happening, is it an alignment/fragmentation question or something else. Is there a simple fix ? This is not a time-critical element of my code. In hope, Louis....