1. 12 Sep, 2004 1 commit
  2. 13 Aug, 2004 1 commit
  3. 21 Sep, 2003 1 commit
  4. 29 Aug, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-08-29 16:00:25 by simonmar] · 7dc97354
      simonmar authored
      Initial x86-64 (aka amd64) support.
      
      Unregisterised it works perfectly.  Registerised, I think it's almost
      there, except that I seem to be running into the known codegen bug in
      GCC with register variables (bug #7871 in the gcc bugzilla), which
      means registerised support is basically hosed until the GCC folks
      can get their act together.
      
      We get 8 more registers on amd64, but only 2 more callee-saves
      registers.  The calling convention seems to pass args in registers by
      default, using the previously-callee-saves %rsi and %rdi as two of the
      new arg registers.
      
      I think GHCi should work, since we already have 64-bit ELF support
      thanks to Mat Chapman's work on the IA64 port.  I haven't tried GHCi,
      though.
      
      The native code generator should be a breeze, because it's so similar
      to plain x86.
      7dc97354
  5. 30 Jul, 2003 1 commit
  6. 22 Nov, 2002 1 commit
  7. 21 Oct, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-10-21 11:38:53 by simonmar] · 2be44cb2
      simonmar authored
      Bite the bullet and generalise the central memory allocation scheme.
      Previously we tried to allocate memory starting from a fixed address,
      which was set for each architecture (0x5000000 was a common one), and
      to decide whether a particular address was in the heap or not we would
      do a simple comparison against this address.
      
      This doesn't work too well, because:
      
       - if we dynamically-load some objects above the boundary, the
         heap-allocated test becomes invalid
      
       - on windows we have less control, and the heap might be
         split into multiple sections
      
       - it turns out that on some Linux kernels we don't get memory where
         we asked for it.  This might be a bug in those kernels, but it
         exposes the fragility of our allocation scheme.
      
      The solution is to bite the bullet and maintain a table mapping
      addresses to a value indicating whether that address is in the heap or
      not.  Since we normally allocate heap in chunks of 1Mb, the table is
      quite small: 4k on a 32-bit machine, using one byte for each 1Mb
      block.  Testing an address for heap residency now involves a memory
      access, but the table is normally cache-resident.  I didn't manage to
      measure any slowdown after making the change.
      
      On a 64-bit machine, we'll need to use a 2-level table; I haven't
      implemented that yet.
      
      Now we can generalise the procedure used to grab memory from the OS.
      In the general case, we allocate one megablock more than we need to,
      and trim off the slop around the allocation to leave an aligned chunk.
      The next time around, however, we try to allocate memory right after
      the last chunk allocated, on the grounds that it is aligned and
      probably free: if this doesn't work, we have to back off to the
      general mechanism (it seems to work most of the time).
      
      This cleans up the Windows story too: is_heap_alloced() has gone, and
      we should be able to handle more than 256M of memory (or whatever the
      arbitrary limit was before).
      
      MERGE TO STABLE (after lots of testing)
      2be44cb2
  8. 14 May, 2002 1 commit
  9. 14 Feb, 2002 1 commit
  10. 21 Jan, 2002 1 commit
  11. 10 Dec, 2001 1 commit
  12. 26 Jul, 2001 1 commit
  13. 29 Jun, 2001 1 commit
  14. 16 Jan, 2001 1 commit
  15. 04 Dec, 2000 1 commit
  16. 04 May, 1999 1 commit
  17. 03 Mar, 1999 1 commit
    • sof's avatar
      [project @ 1999-03-03 19:04:56 by sof] · 9bebeb69
      sof authored
      Added is_heap_alloced() to the API - returns true if an address is
      within the range of addresses that we've been given back from the
      OS.
      
      Only needed for Win32 DLLs, so it's only defined when compiling up
      a Win32 RTS DLL.
      9bebeb69
  18. 05 Feb, 1999 1 commit
  19. 13 Jan, 1999 1 commit
    • simonm's avatar
      [project @ 1999-01-13 17:25:37 by simonm] · 4391e44f
      simonm authored
      Added a generational garbage collector.
      
      The collector is reliable but fairly untuned as yet.  It works with an
      arbitrary number of generations: use +RTS -G<gens> to change the
      number of generations used (default 2).
      
      Stats: +RTS -Sstderr is quite useful, but to really see what's going
      on compile the RTS with -DDEBUG and use +RTS -D32.
      
      ARR_PTRS removed - it wasn't used anywhere.
      
      Sanity checking improved:
      	- free blocks are now spammed when sanity checking is turned on
      	- a check for leaking blocks is performed after each GC.
      4391e44f
  20. 02 Dec, 1998 1 commit