Changes between Version 4 and Version 5 of Commentary/Rts/Word


Ignore:
Timestamp:
Dec 12, 2012 8:46:57 AM (16 months ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Rts/Word

    v4 v5  
    1616The word is the basic unit of allocation in GHC: the heap and stack are both allocated in units of a word.  Throughout the runtime we often use sizes that are in units of words, so as to abstract away from the real word size of the underlying architecture. 
    1717 
    18 C-- only understands units of bytes, so we have various macros in [[GhcFile(includes/Cmm.h)]] to make manipulating things in units of words easier in {{{.cmm}}} files. 
     18The `StgWord` type is also useful for storing the ''size'' of a memory object, since an `StgWord` is guaranteed to at least span the range of addressable memory. It is rather like `size_t` in this respect, although we prefer to use `StgWord` in the RTS sources. 
     19 
     20C-- only understands units of bytes, so we have various macros in source:includes/Cmm.h to make manipulating things in units of words easier in {{{.cmm}}} files.