summaryrefslogtreecommitdiff
path: root/rts/RtsUtils.c
Commit message (Collapse)AuthorAgeFilesLines
* Basic heap profile support without -profSimon Marlow2007-04-271-2/+0
| | | | | | | | | | | | | | Now that constructor info tables contain the name of the constructor, we can generate useful heap profiles without requiring the whole program and libraries to be compiled with -prof. So now, "+RTS -hT" generates a heap profile for any program, dividing the profile by constructor. It wouldn't be hard to add support for grouping constructors by module, or to restrict the profile to certain constructors/modules/packages. This means that for the first time we can get heap profiles for GHCi, which was previously impossible because the byte-code interpreter and linker don't work with -prof.
* Fix C/Haskell type mismatchesIan Lynagh2007-04-031-3/+3
|
* Don't overwrite old memory with 0xaa when doing a reallocIan Lynagh2006-12-181-4/+6
|
* Fix allocation debugger to handle allocations in con/destructorsIan Lynagh2006-12-131-29/+64
| | | | | | conc021 is an example of a program that broke. It doesn't handle them particularly well still, but it doesn't crash at least.
* Give a better panic if the allocation debugger is used uninitialisedIan Lynagh2006-12-131-0/+6
|
* Fix allocate name clash in the HEADIan Lynagh2006-12-111-7/+7
|
* When debugging, have the allocator help us a bitIan Lynagh2006-12-111-2/+109
| | | | | | | We now check for freeing memory that isn't allocated, and overwrite memory we are about to free with 0xaa. It might be nice to also have a flag to control whether the memory actually gets free'd.
* replace stgMallocBytesRWX() with our own allocatorSimon Marlow2006-05-301-52/+0
| | | | | | | | | | | | | | | | | | | | See bug #738 Allocating executable memory is getting more difficult these days. In particular, the default SELinux policy on Fedora Core 5 disallows making the heap (i.e. malloc()'d memory) executable, although it does apparently allow mmap()'ing anonymous executable memory by default. Previously, stgMallocBytesRWX() used malloc() underneath, and then tried to make the page holding the memory executable. This was rather hacky and fails with Fedora Core 5. This patch adds a mini-allocator for executable memory, based on the block allocator. We grab page-sized blocks and make them executable, then allocate small objects from the page. There's a simple free function, that will free whole pages back to the system when they are empty.
* Declare this file to be POSIXSimon Marlow2006-05-181-9/+1
| | | | | This is simpler than using _POSIX_THREAD_SEMANTICS on Solaris to get the right version of ctime_r().
* fix ctime_r problem on Solaris (I hope)Simon Marlow2006-05-021-0/+7
|
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+367
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.