/* -----------------------------------------------------------------------------
- * $Id: Storage.c,v 1.28 2000/11/13 14:40:37 simonmar Exp $
+ * $Id: Storage.c,v 1.30 2000/12/11 12:37:00 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
stat_exit(calcAllocated());
}
+/* -----------------------------------------------------------------------------
+ Setting the heap size. This function is callable from Haskell (GHC
+ uses it to implement the -H<size> option).
+ -------------------------------------------------------------------------- */
+
+void
+setHeapSize( HsInt size )
+{
+ RtsFlags.GcFlags.heapSizeSuggestion = size / BLOCK_SIZE;
+ if (RtsFlags.GcFlags.heapSizeSuggestion >
+ RtsFlags.GcFlags.maxHeapSize) {
+ RtsFlags.GcFlags.maxHeapSize = RtsFlags.GcFlags.heapSizeSuggestion;
+ }
+}
/* -----------------------------------------------------------------------------
CAF management.