Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!lll-tis!helios.ee.lbl.gov!nosc!ucsd!ucsdhub!esosun!seismo!uunet!sco!amys From: amys@sco.COM (amy snader) Newsgroups: comp.unix.xenix Subject: 386 malloc with huge programs Keywords: pathalias vs. malloc Message-ID: <483@sysco> Date: 23 Jul 88 18:45:00 GMT Organization: The Santa Cruz Operation, Inc. Lines: 25 Here's a hint for all of you out there who are running BIG programs on the '386, especially those large enough to cause the system to page: If your huge application does many small malloc()'s (as opposed to a couple of big malloc()'s, compiling your application with -lmalloc can be a tremendous performance win. This is a "try it and see" sort of thing. For both small applications and for big applications that allocate their memory all in one chunk, normal malloc is less overhead. But when -lmalloc wins, it really wins. I have an (admittedly contrived) test program that runs in 1/50th the time with -lmalloc. The explanation has to do with which pages have to be faulted in to manage malloc()'s freelist. I suspect this may be helpful in running pathalias on the 386. (To JFH -- no, there is no difference in how a growing process is paged vs. one whose size is static). --Amy (sco!abs)