Changes between Version 3 and Version 4 of Commentary/Rts/Storage/BlockAlloc


Ignore:
Timestamp:
Oct 5, 2009 6:26:05 PM (5 years ago)
Author:
diatchki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Rts/Storage/BlockAlloc

    v3 v4  
    4141 
    4242Block descriptors are currently 32 or 64 bytes depending on the word size (d = 5 or 6).  The block descriptor itself is  
    43 the structure `bdescr` defined in [[GhcFile(includes/Block.h)]], and that file also defines the `Bdescr()` macro. 
     43the structure `bdescr` defined in [[GhcFile(includes/rts/storage/Block.h)]], and that file also defines the `Bdescr()` macro. 
    4444 
    4545The block allocator has a the following structure: 
    4646 
    47  * At the bottom, talking to the OS, is the megablock allocator ([[GhcFile(rts/MBlock.c)]], [[GhcFile(rts/MBlock.h)]]). 
     47 * At the bottom, talking to the OS, is the megablock allocator ([[GhcFile(rts/sm/MBlock.c)]], [[GhcFile(includes/rts/storage/MBlock.h)]]). 
    4848   It is responsible for delivering megablocks, correctly aligned, to the upper layers.  It is also responsible for 
    4949   implementing `HEAP_ALLOCED()`: the predicate that tests whether a pointer points to dynamically allocated memory 
    5050   or not.  This is implemented as a simple bitmap lookup on a 32-bit machine, and something more complex on 
    51    64-bit addressed machines.  See [[GhcFile(rts/MBlock.h)]] for details. 
     51   64-bit addressed machines.  See [[GhcFile(includes/rts/storage/MBlock.h)]] for details. 
    5252   [[br]][[br]] 
    5353   Currently, megablocks are never freed back to the OS, except at the end of the program.  This is a potential 
    5454   improvement that could be made. 
    5555 
    56  * Sitting on top of the megablock allocator is the block layer ([[GhcFile(includes/Block.h)]], [[GhcFile(rts/BlockAlloc.c)]]). 
     56 * Sitting on top of the megablock allocator is the block layer ([[GhcFile(includes/rts/storage/Block.h)]], [[GhcFile(rts/sm/BlockAlloc.c)]]). 
    5757   This layer is responsible for providing: 
    5858{{{