1. 21 May, 2003 1 commit
  2. 14 May, 2003 1 commit
  3. 26 Mar, 2003 1 commit
  4. 20 Mar, 2003 1 commit
  5. 11 Dec, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-12-11 15:36:20 by simonmar] · 0bffc410
      simonmar authored
      Merge the eval-apply-branch on to the HEAD
      ------------------------------------------
      
      This is a change to GHC's evaluation model in order to ultimately make
      GHC more portable and to reduce complexity in some areas.
      
      At some point we'll update the commentary to describe the new state of
      the RTS.  Pending that, the highlights of this change are:
      
        - No more Su.  The Su register is gone, update frames are one
          word smaller.
      
        - Slow-entry points and arg checks are gone.  Unknown function calls
          are handled by automatically-generated RTS entry points (AutoApply.hc,
          generated by the program in utils/genapply).
      
        - The stack layout is stricter: there are no "pending arguments" on
          the stack any more, the stack is always strictly a sequence of
          stack frames.
      
          This means that there's no need for LOOKS_LIKE_GHC_INFO() or
          LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
          how to find the boundary between the text and data segments (BIG WIN!).
      
        - A couple of nasty hacks in the mangler caused by the neet to
          identify closure ptrs vs. info tables have gone away.
      
        - Info tables are a bit more complicated.  See InfoTables.h for the
          details.
      
        - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
          in GHCi which affected primitives and unboxed tuples are now
          fixed.
      
        - Binary sizes are reduced by about 7% on x86.  Performance is roughly
          similar, some programs get faster while some get slower.  I've seen
          GHCi perform worse on some examples, but haven't investigated
          further yet (GHCi performance *should* be about the same or better
          in theory).
      
        - Internally the code generator is rather better organised.  I've moved
          info-table generation from the NCG into the main codeGen where it is
          shared with the C back-end; info tables are now emitted as arrays
          of words in both back-ends.  The NCG is one step closer to being able
          to support profiling.
      
      This has all been fairly thoroughly tested, but no doubt I've messed
      up the commit in some way.
      0bffc410
  6. 26 Nov, 2002 1 commit
  7. 22 Nov, 2002 2 commits
  8. 07 Nov, 2002 1 commit
  9. 05 Nov, 2002 3 commits
  10. 27 Oct, 2002 1 commit
    • wolfgang's avatar
      [project @ 2002-10-27 21:46:27 by wolfgang] · 80498a8a
      wolfgang authored
      For Mac OS X, use the underlying Mach Microkernel calls instead of mmap.
      Darwin's mmap doesn't honor the passed-in address without MAP_FIXED,
      and MAP_FIXED replaces all existing mappings, so it can't be used.
      80498a8a
  11. 25 Oct, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-10-25 12:56:34 by simonmar] · 24889e6a
      simonmar authored
      We shouldn't be using MAP_FIXED on solaris (fixes last night's crash).
      
      Unfortunately on Solaris the heuristics don't work too well.  Solaris
      seems to ignore the addr argument to mmap when MAP_FIXED is not
      specified, and starts handing out memory from the top of the address
      space.  So we allocate 2M each time and munmap() ends to leave an
      aligned 1M chunk.  This will eventually leave the address space
      completely full of 1M holes.  I don't have a good solution to this at
      the moment.
      
      MERGE TO STABLE
      24889e6a
  12. 23 Oct, 2002 1 commit
  13. 21 Oct, 2002 2 commits
    • simonmar's avatar
      [project @ 2002-10-21 12:42:31 by simonmar] · 5cc57129
      simonmar authored
      Turn an instance of 0xfff00000 into ~MBLOCK_MASK in the Win32 code.
      5cc57129
    • 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
  14. 17 Jul, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-07-17 09:21:48 by simonmar] · 7457757f
      simonmar authored
      Remove most #includes of system headers from Stg.h, and instead
      #include any required headers directly in each RTS source file.
      
      The idea is to (a) reduce namespace pollution from system headers that
      we don't need, (c) be clearer about dependencies on system things in
      the RTS, and (c) improve via-C compilation times (maybe).
      
      In practice though, HsBase.h #includes everything anyway, so the
      difference from the point of view of .hc source is minimal.  However,
      this makes it easier to move to zero-includes if we wanted to (see
      discussion on the FFI list; I'm still not sure that's possible but
      at least this is a step in the right direction).
      7457757f
  15. 12 Apr, 2002 1 commit
  16. 26 Mar, 2002 1 commit
  17. 08 Jan, 2002 1 commit
    • sof's avatar
      [project @ 2002-01-08 16:38:27 by sof] · dd7f7b3d
      sof authored
      Make better use of the -M<size> setting under Win32. Use it to guide
      the amount of VM to reserve -- the default is (still) 256M, but the
      user will now have a way of overriding this setting.
      dd7f7b3d
  18. 10 Dec, 2001 1 commit
  19. 26 Oct, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-10-26 11:49:19 by sewardj] · 80ca788a
      sewardj authored
      merge from stable, rev 1.23.4.1:
      
        Win32 only: implement sane failure semantics + message when out of
        memory, rather than continuing and allowing the rest of the system
        to seg out.  Also, increase the 128M limit to 256M.
      
        This allegedly fixes the Antony Courtney Win32 segfault.
      80ca788a
  20. 14 Aug, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-08-14 13:40:07 by sewardj] · bc5c8021
      sewardj authored
      Change the story about POSIX headers in C compilation.
      
      Until now, all C code in the RTS and library cbits has by default been
      compiled with settings for POSIXness enabled, that is:
         #define _POSIX_SOURCE   1
         #define _POSIX_C_SOURCE 199309L
         #define _ISOC9X_SOURCE
      If you wanted to negate this, you'd have to define NON_POSIX_SOURCE
      before including headers.
      
      This scheme has some bad effects:
      
      * It means that ccall-unfoldings exported via interfaces from a
        module compiled with -DNON_POSIX_SOURCE may not compile when
        imported into a module which does not -DNON_POSIX_SOURCE.
      
      * It overlaps with the feature tests we do with autoconf.
      
      * It seems to have caused borkage in the Solaris builds for some
        considerable period of time.
      
      The New Way is:
      
      * The default changes to not-being-in-Posix mode.
      
      * If you want to force a C file into Posix mode, #include as
        the **first** include the new file ghc/includes/PosixSource.h.
        Most of the RTS C sources have this include now.
      
      * NON_POSIX_SOURCE is almost totally expunged.  Unfortunately
        we have to retain some vestiges of it in ghc/compiler so that
        modules compiled via C on Solaris using older compilers don't
        break.
      bc5c8021
  21. 24 Jul, 2001 1 commit
  22. 16 Jan, 2001 1 commit
  23. 16 Dec, 2000 1 commit
  24. 04 Dec, 2000 1 commit
  25. 06 Sep, 2000 1 commit
    • rrt's avatar
      [project @ 2000-09-06 11:12:07 by rrt] · e349469c
      rrt authored
      Made message for exceeding 128Mb of heap on Windows more helpful, and
      only abort when this limit is exceeded, not on first memory allocation!
      e349469c
  26. 17 Aug, 2000 1 commit
    • rrt's avatar
      [project @ 2000-08-17 15:21:55 by rrt] · 39cbf830
      rrt authored
      barf when a DLLized RTS tries to allocate a 2nd Windows monster block;
      is_heap_alloced stops working at this point. No problem for the static
      build.
      39cbf830
  27. 04 Aug, 2000 1 commit
    • lewie's avatar
      [project @ 2000-08-04 23:31:43 by lewie] · 39318542
      lewie authored
      Port to OpenBSD from Thomas Nordin.  Please merge with 4.08 (you'll also
      need the new config.guess and config.sub from the previous commit).
      39318542
  28. 03 Apr, 2000 1 commit
    • rrt's avatar
      [project @ 2000-04-03 15:24:21 by rrt] · a0b380bb
      rrt authored
      Stopped getourtimeofday() being called under mingwin.
      MBlock.c: changed one instance of 128 * 1024 * 1024 into SIZE_RESERVED_POOL
      and added a TODO comment (bug in is_heap_alloced(), which won't work if
      more than one megablock is ever allocated).
      a0b380bb
  29. 22 Jan, 2000 1 commit
  30. 15 Dec, 1999 1 commit
  31. 16 Sep, 1999 1 commit
  32. 11 Mar, 1999 1 commit
  33. 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
  34. 05 Feb, 1999 1 commit
  35. 26 Jan, 1999 1 commit
  36. 25 Jan, 1999 1 commit