retombee du PR#1495 : suppression de Heap_chunk_max

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5343 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2002-12-15 23:27:06 +00:00
parent 05b8cd8c4c
commit e0991a68d7
3 changed files with 2 additions and 11 deletions

View File

@ -121,11 +121,6 @@ typedef struct { uint32 l, h; } uint64, int64;
Must be a multiple of [Page_size / sizeof (value)]. */
#define Heap_chunk_min (2 * Page_size / sizeof (value))
/* Maximum size of a contiguous piece of the heap (words).
Must be greater than or equal to [Heap_chunk_min].
Must be greater than or equal to [Whsize_wosize (Max_wosize)]. */
#define Heap_chunk_max (Whsize_wosize (Max_wosize))
/* Default size increment when growing the heap. (words)
Must be a multiple of [Page_size / sizeof (value)]. */
#define Heap_chunk_def (15 * Page_size)

View File

@ -306,7 +306,6 @@ static long norm_heapincr (long unsigned int i)
#define Psv (Wsize_bsize (Page_size))
i = ((i + Psv - 1) / Psv) * Psv;
if (i < Heap_chunk_min) i = Heap_chunk_min;
if (i > Heap_chunk_max) i = Heap_chunk_max;
return i;
}

View File

@ -380,17 +380,14 @@ void finish_major_cycle (void)
allocated_words = 0;
}
/* Clip the request to [Heap_chunk_min..Heap_chunk_max] and round it
/* Make sure the request is at least Heap_chunk_min and round it up
to a multiple of the page size.
*/
static asize_t clip_heap_chunk_size (asize_t request)
{ Assert (Heap_chunk_max >= Heap_chunk_min);
{
if (request < Bsize_wsize (Heap_chunk_min)){
request = Bsize_wsize (Heap_chunk_min);
}
if (request > Bsize_wsize (Heap_chunk_max)){
request = Bsize_wsize (Heap_chunk_max);
}
return ((request + Page_size - 1) >> Page_log) << Page_log;
}