home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / programm / 3406 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  1.1 KB

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!csd4.csd.uwm.edu!markh
  2. From: markh@csd4.csd.uwm.edu (Mark)
  3. Newsgroups: comp.programming
  4. Subject: Memory management models
  5. Date: 4 Jan 1993 20:32:58 GMT
  6. Organization: Computing Services Division, University of Wisconsin - Milwaukee
  7. Lines: 16
  8. Message-ID: <1ia6tqINNaps@uwm.edu>
  9. NNTP-Posting-Host: 129.89.7.4
  10.  
  11.    I'm looking for efficient models for source-level memory management that
  12. resolve fragmentation and allows contiguous segments of arbitrary size to be
  13. allocated.  They should be compared to the model which I presently use:
  14.  
  15.         * Free lists maintained for blocks of size 2^N for each N < 32,
  16.  
  17.         * Allocated segment are fit into the smallest available block of
  18.           size 2^N, using the Nth free-list if it's non-empty.
  19.  
  20. Default malloc is insufficient because it doesn't normally protect against
  21. external fragmentation, and source-level paging is insufficient because it
  22. doesn't resolve the need for contiguity.
  23.  
  24.    The model above guarantees that fragmentation will always lie under 50%,
  25. that allocation will usually be a constant-time operation and that deallocation
  26. will always be constant time.
  27.