Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!oberon!skat.usc.edu!blarson From: blarson@skat.usc.edu (Bob Larson) Newsgroups: comp.lang.c,comp.unix.questions Subject: Optimizing use of malloc Message-ID: <4753@oberon.USC.EDU> Date: Sun, 18-Oct-87 09:16:12 EDT Article-I.D.: oberon.4753 Posted: Sun Oct 18 09:16:12 1987 Date-Received: Sun, 18-Oct-87 23:50:04 EDT Sender: nobody@oberon.USC.EDU Reply-To: blarson@skat.usc.edu (Bob Larson) Followup-To: comp.lang.c Organization: USC AIS, Los Angeles Lines: 20 Xref: mnetor comp.lang.c:5000 comp.unix.questions:4578 Most versions of malloc will round the amount of memory you request to some number convienient for it. Since the pointer returned must be maximally alligned, this is normally a multiple of the size of the largest type. What I need to know what sizes of memory requests to malloc will reduce wasted space for a variety of systems: bsd 4.2, bsd 4.3, sun 3.*, ultrix 32, sys v (various releases & systems) I also need to know what to #ifdef for the various systems. (BSD and sys V are in separate files already, but I think the malloc stratagy changed from 4.2 to 4.3, and likly did elsewhere.) This is for mg (MicroGnuEmacs) (version 2a is under development). It will be usable without this information, however it will be slower (reallocating memory more often) and bigger. Please mail your replies to one of the addresses below (or just use r). I'll sumerize if anyone else wants the information. -- Bob Larson Arpa: Blarson@Ecla.Usc.Edu Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson blarson@skat.usc.edu Prime mailing list (requests): info-prime-request%fns1@ecla.usc.edu