home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / programm / 4443 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.6 KB

  1. Path: sparky!uunet!nwnexus!ole!rwing!fnx!sgihbtn!markmc
  2. From: markmc@sierra.com (Mark McWiggins)
  3. Newsgroups: comp.unix.programmer,comp.sys.hp.comp.sys.dec
  4. Subject: Best malloc(3) replacement for huge sys w/many small objects?
  5. Summary: slow
  6. Message-ID: <markmc.714700004@sierra.com>
  7. Date: 24 Aug 92 23:46:44 GMT
  8. Sender: news@sierra.com
  9. Organization: Sierra Geophysics Inc.,  Kirkland, Wa
  10. Lines: 25
  11. Nntp-Posting-Host: grumpy
  12.  
  13. We're building a large application that seems to have reached a threshold
  14. in the use of dynamic memory. A routine that allocates 300 or so small
  15. objects was running acceptably fast, but with changes to the program
  16. started to bog down after the first 75 or so allocations.
  17.  
  18. I believe I've narrowed it down to the malloc() subsystem, but I'm not
  19. positive about this ...
  20.  
  21. In any event, I'm going to begin my effort to tune the system by changing
  22. out malloc(), because I'll have to find a malloc() replacement for the 
  23. Decstation when we port the system there. Its man page contains this helpful 
  24. caveat:
  25.  
  26.      Currently, the allocator is unsuitable for direct use in a large virtual
  27.      environment where many small blocks are kept, since it keeps all allo-
  28.      cated and freed blocks on a circular list.  Just before more memory is
  29.      allocated, all allocated and freed blocks are referenced.
  30.  
  31. I see several versions of malloc in the UUNET archive, and I believe Knuth
  32. had this problem nailed down. Do you have a recommendation for this situation?
  33.  
  34. Thanks in advance.
  35. --
  36. Mark McWiggins           +1 206 822 5200x377 days      Box 31356
  37. markmc@sierra.com        +1 206 632 1905 24 hrs.       Seattle WA 98103-1356
  38.