Fixes for MSVC.

master
alainfrisch 2015-11-23 13:30:34 +01:00
parent 4788ab33d6
commit 092c5e4506
2 changed files with 5 additions and 1 deletions

View File

@ -617,12 +617,12 @@ static void intern_add_to_heap(mlsize_t whsize)
{
/* Add new heap chunk to heap if needed */
if (intern_extra_block != NULL) {
Assert(intern_block == 0);
/* If heap chunk not filled totally, build free block at end */
asize_t request =
((Bsize_wsize(whsize) + Page_size - 1) >> Page_log) << Page_log;
header_t * end_extra_block =
(header_t *) intern_extra_block + Wsize_bsize(request);
Assert(intern_block == 0);
Assert(intern_dest <= end_extra_block);
if (intern_dest < end_extra_block){
caml_make_free_blocks ((value *) intern_dest,

View File

@ -26,6 +26,10 @@
#include "caml/mlvalues.h"
#include "caml/signals.h"
#ifdef _MSC_VER
#define inline _inline
#endif
extern uintnat caml_percent_free; /* major_gc.c */
/* Page table management */