| 
     
      
      
      From: Joe E. <jen...@fl...> - 2010-02-03 21:32:55
      
     
   | 
Donal K. Fellows wrote: > [...] Cost of malloc() on a 32-bit platform is 8 bytes [...] Clarification/correction: this depends entirely on the malloc() implementation. Eight bytes is typical overhead for simple-minded allocators based on the classic K&R chapter 8 algorithm, but very few modern malloc()s work that way anymore. Under current state-of-the-art allocators, the overhead for a single malloc(N) can be anywhere from <1 bit (amortized) to 2**(floor(ln N)) bytes, depending on the implementation and the size of the request. --JE  |